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)
Usageβ
<Dialog visible={isVisible} onDismiss={() => console.log('dismissed')} panDirection={PanningProvider.Directions.DOWN} > <Text text60>Content</Text> </Dialog>
APIβ
containerStyleβ
Component's container style
ViewStyle
heightβ
Height
string | number
ignoreBackgroundPressβ
Whether or not to ignore background press
boolean
onDialogDismissedβ
Called once the dialog has been dismissed completely
(props: any) => void
onDismissβ
Called when clicking on the background
(props?: any) => void
overlayBackgroundColorβ
The color of the overlay background
string
panDirectionβ
The direction of the allowed pan
UP | DOWN | LEFT | RIGHT
pannableHeaderPropsβ
The props that will be passed to the pannable header
any
renderPannableHeaderβ
If this is added only the header will be pannable. Props are transferred to the 'renderPannableHeader'β
For scrollable content (the children of the dialog)
(props: any) => JSX.Element
testIDβ
The test id for e2e tests
string
useSafeAreaβ
In iOS, use safe area, in case component attached to the bottom
boolean
visibleβ
Control visibility of the component
boolean
widthβ
Width
string | number