@@ -4,7 +4,7 @@ import {StyleSheet, StyleProp, ViewStyle, ModalPropsIOS, AccessibilityProps} fro
4
4
import { Colors } from '../../style' ;
5
5
import { AlignmentModifiers , extractAlignmentsValues } from '../../commons/modifiers' ;
6
6
import { Constants , asBaseComponent } from '../../commons/new' ;
7
- import Modal from '../modal' ;
7
+ import Modal , { ModalProps } from '../modal' ;
8
8
import View from '../view' ;
9
9
import PanListenerView from '../panningViews/panListenerView' ;
10
10
import DialogDismissibleView from './DialogDismissibleView' ;
@@ -70,6 +70,10 @@ export interface DialogProps extends AlignmentModifiers, RNPartialProps {
70
70
* The props that will be passed to the pannable header
71
71
*/
72
72
pannableHeaderProps ?: any ;
73
+ /**
74
+ * Additional props for the modal.
75
+ */
76
+ modalProps ?: ModalProps ;
73
77
/**
74
78
* The Dialog`s container style
75
79
*/
@@ -246,7 +250,7 @@ class Dialog extends Component<DialogProps, DialogState> {
246
250
247
251
render = ( ) => {
248
252
const { modalVisibility} = this . state ;
249
- const { testID, supportedOrientations, accessibilityLabel, ignoreBackgroundPress} = this . props ;
253
+ const { testID, supportedOrientations, accessibilityLabel, ignoreBackgroundPress, modalProps } = this . props ;
250
254
const onBackgroundPress = ! ignoreBackgroundPress ? this . hideDialogView : undefined ;
251
255
252
256
return (
@@ -259,6 +263,7 @@ class Dialog extends Component<DialogProps, DialogState> {
259
263
onRequestClose = { onBackgroundPress }
260
264
supportedOrientations = { supportedOrientations }
261
265
accessibilityLabel = { accessibilityLabel }
266
+ { ...modalProps }
262
267
>
263
268
{ this . renderDialogContainer ( ) }
264
269
</ Modal >
0 commit comments