From bfc73e39640c609bc2fd670d4787c92af4f0e699 Mon Sep 17 00:00:00 2001 From: ilyary <35370609+ilyary@users.noreply.github.com> Date: Thu, 11 Sep 2025 09:41:04 +0200 Subject: [PATCH] Add elevation prop to Modal component --- src/components/Modal.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index be16a5abde..b0b9563f0f 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -12,7 +12,7 @@ import { import { useSafeAreaInsets } from 'react-native-safe-area-context'; import useLatestCallback from 'use-latest-callback'; -import Surface from './Surface'; +import Surface, { Props as SurfaceProps } from './Surface'; import { useInternalTheme } from '../core/theming'; import type { ThemeProp } from '../types'; import { addEventListener } from '../utils/addEventListener'; @@ -53,6 +53,10 @@ export type Props = { * Use this prop to change the default wrapper style or to override safe area insets with marginTop and marginBottom. */ style?: StyleProp; + /** + * Surface elevation + */ + elevation?: SurfaceProps['elevation']; /** * @optional */ @@ -109,6 +113,7 @@ function Modal({ children, contentContainerStyle, style, + elevation, theme: themeOverrides, testID = 'modal', }: Props) { @@ -220,6 +225,7 @@ function Modal({ testID={`${testID}-surface`} theme={theme} style={[{ opacity }, styles.content, contentContainerStyle]} + elevation={elevation} container > {children}