Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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<ViewStyle>;
/**
* Surface elevation
*/
elevation?: SurfaceProps['elevation'];
/**
* @optional
*/
Expand Down Expand Up @@ -109,6 +113,7 @@ function Modal({
children,
contentContainerStyle,
style,
elevation,
theme: themeOverrides,
testID = 'modal',
}: Props) {
Expand Down Expand Up @@ -220,6 +225,7 @@ function Modal({
testID={`${testID}-surface`}
theme={theme}
style={[{ opacity }, styles.content, contentContainerStyle]}
elevation={elevation}
container
>
{children}
Expand Down