Incubator.Dialog
Component for displaying custom content inside a popup dialog
(code example)
This component support alignment modifiers.
Use alignment modifiers to control the dialog position (top, bottom, centerV, centerH, etc... by default the dialog is aligned to center).
When adding a FlatList
\ ScrollView
to the content be sure to use one from react-native-gesture-handler
(see this link for SectionList
).
Usageβ
<Dialog visible={isVisible} onDismiss={() => console.log('dismissed')} panDirection={PanningProvider.Directions.DOWN} > <Text text60>Content</Text> </Dialog>
APIβ
containerPropsβ
Extra props for the container
ViewProps
containerStyleβ
The Dialogs container style (it is set to {position: 'absolute'})
ViewStyle `
directionβ
The direction from which and to which the dialog is animating \ panning (default down).
up | down | left | right
headerPropsβ
The Dialog's header (title, subtitle etc)
DialogHeaderProps
ignoreBackgroundPressβ
Whether or not to ignore background press.
boolean
modalPropsβ
Pass props to the dialog modal
ModalProps
onDismissβ
Callback that is called after the dialog's dismiss (after the animation has ended).
(props?: DialogProps) => void
showCloseβ
Show the close button
boolean
testIDβ
Used to locate this view in end-to-end tests.
The container has the original id.
Supported inner elements IDs:
${TestID}.modal
- the Modal's id.
${TestID}.overlayFadingBackground
- the fading background id.
string
visibleβ
The visibility of the dialog
boolean