Skip to content

Commit

Permalink
feat: add style prop to Modal (#2474)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahce committed Jan 8, 2021
1 parent 2d1c56c commit a22ed8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ type Props = {
* Style for the content of the modal
*/
contentContainerStyle?: StyleProp<ViewStyle>;
/**
* Style for the wrapper of the modal.
* Use this prop to change the default wrapper style or to override safe area insets with marginTop and marginBottom.
*/
style?: StyleProp<ViewStyle>;
/**
* @optional
*/
Expand Down Expand Up @@ -191,6 +196,7 @@ class Modal extends React.Component<Props, State> {
const {
children,
dismissable,
style,
theme,
contentContainerStyle,
overlayAccessibilityLabel,
Expand Down Expand Up @@ -221,6 +227,7 @@ class Modal extends React.Component<Props, State> {
style={[
styles.wrapper,
{ marginTop: TOP_INSET, marginBottom: BOTTOM_INSET },
style,
]}
pointerEvents="box-none"
>
Expand Down

0 comments on commit a22ed8d

Please sign in to comment.