UNPKG

1.16 kBTypeScriptView Raw
1import * as React from 'react';
2import { View, ViewStyle, StyleProp } from 'react-native';
3declare type Props = React.ComponentPropsWithRef<typeof View> & {
4 /**
5 * Content of the `DialogContent`.
6 */
7 children: React.ReactNode;
8 style?: StyleProp<ViewStyle>;
9};
10/**
11 * A component to show content in a Dialog.
12 *
13 * <div class="screenshots">
14 * <figure>
15 * <img class="medium" src="screenshots/dialog-content.png" />
16 * </figure>
17 * </div>
18 *
19 *
20 * ## Usage
21 * ```js
22 * import * as React from 'react';
23 * import { Paragraph, Dialog, Portal } from 'react-native-paper';
24 *
25 * const MyComponent = () => {
26 * const [visible, setVisible] = React.useState(false);
27 *
28 * const hideDialog = () => setVisible(false);
29 *
30 * return (
31 * <Portal>
32 * <Dialog visible={visible} onDismiss={hideDialog}>
33 * <Dialog.Content>
34 * <Paragraph>This is simple dialog</Paragraph>
35 * </Dialog.Content>
36 * </Dialog>
37 * </Portal>
38 * );
39 * };
40 *
41 * export default MyComponent;
42 * ```
43 */
44declare const DialogContent: {
45 (props: Props): JSX.Element;
46 displayName: string;
47};
48export default DialogContent;