import * as React from "react"; import { StyleProp, ViewStyle } from "react-native"; import { DefaultTheme } from "styled-components"; declare type Props = { /** * Determines whether clicking outside the dialog dismiss it. */ dismissable?: boolean; /** * Callback that is called when the user dismisses the dialog. */ onDismiss?: () => void; /** * Determines Whether the dialog is visible. */ visible: boolean; /** * Content of the `Dialog`. */ children: React.ReactNode; style?: StyleProp; /** * @optional */ theme?: DefaultTheme; }; /** * Dialogs inform users about a specific task and may contain critical information, require decisions, or involve multiple tasks. * To render the `Dialog` above other components, you'll need to wrap it with the [`Portal`](portal.html) component. * *
* * *
* * ## Usage * ```js * import * as React from 'react'; * import { View } from 'react-native'; * import Button from 'react-native-simple-elements/components/Button'; * import { Paragraph } from "react-native-simple-elements/components/Text"; * import Portal from "react-native-simple-elements/components/Portal"; * import Dialog from "react-native-simple-elements/components/Dialog"; * * const MyComponent = () => { * const [visible, setVisible] = React.useState(false); * * const showDialog = () => setVisible(true); * * const hideDialog = () => setVisible(false); * * return ( * * * * * Alert * * This is simple dialog * * * * * * * * ); * }; * * export default MyComponent; * ``` */ declare const Dialog: { ({ children, dismissable, onDismiss, visible, style, }: Props): JSX.Element; Content: { (props: import("react-native").ViewProps & React.RefAttributes & { children: React.ReactNode; style?: StyleProp; }): JSX.Element; displayName: string; }; Actions: { (props: import("react-native").ViewProps & React.RefAttributes & { children: React.ReactNode; style?: StyleProp; }): JSX.Element; displayName: string; }; Title: { ({ children, style, ...rest }: import("react-native").TextProps & { children: React.ReactNode; } & { children: React.ReactNode; style?: StyleProp; theme?: DefaultTheme; }): JSX.Element; displayName: string; }; ScrollArea: { (props: import("react-native").ViewProps & React.RefAttributes & { children: React.ReactNode; style?: StyleProp; }): JSX.Element; displayName: string; }; }; export default Dialog;