Skip to content

Commit a22ed8d

Browse files
authored
feat: add style prop to Modal (#2474)
1 parent 2d1c56c commit a22ed8d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/Modal.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ type Props = {
4141
* Style for the content of the modal
4242
*/
4343
contentContainerStyle?: StyleProp<ViewStyle>;
44+
/**
45+
* Style for the wrapper of the modal.
46+
* Use this prop to change the default wrapper style or to override safe area insets with marginTop and marginBottom.
47+
*/
48+
style?: StyleProp<ViewStyle>;
4449
/**
4550
* @optional
4651
*/
@@ -191,6 +196,7 @@ class Modal extends React.Component<Props, State> {
191196
const {
192197
children,
193198
dismissable,
199+
style,
194200
theme,
195201
contentContainerStyle,
196202
overlayAccessibilityLabel,
@@ -221,6 +227,7 @@ class Modal extends React.Component<Props, State> {
221227
style={[
222228
styles.wrapper,
223229
{ marginTop: TOP_INSET, marginBottom: BOTTOM_INSET },
230+
style,
224231
]}
225232
pointerEvents="box-none"
226233
>

0 commit comments

Comments
 (0)