UNPKG

1.27 kBTypeScriptView Raw
1import * as React from 'react';
2import { StyleProp, View, ViewStyle } from 'react-native';
3import type { ThemeProp } from 'src/types';
4export declare type Props = React.ComponentPropsWithRef<typeof View> & {
5 /**
6 * Content of the `DialogActions`.
7 */
8 children: React.ReactNode;
9 style?: StyleProp<ViewStyle>;
10 /**
11 * @optional
12 */
13 theme?: ThemeProp;
14};
15/**
16 * A component to show a list of actions in a Dialog.
17 *
18 * ## Usage
19 * ```js
20 * import * as React from 'react';
21 * import { Button, Dialog, Portal } from 'react-native-paper';
22 *
23 * const MyComponent = () => {
24 * const [visible, setVisible] = React.useState(false);
25 *
26 * const hideDialog = () => setVisible(false);
27 *
28 * return (
29 * <Portal>
30 * <Dialog visible={visible} onDismiss={hideDialog}>
31 * <Dialog.Actions>
32 * <Button onPress={() => console.log('Cancel')}>Cancel</Button>
33 * <Button onPress={() => console.log('Ok')}>Ok</Button>
34 * </Dialog.Actions>
35 * </Dialog>
36 * </Portal>
37 * );
38 * };
39 *
40 * export default MyComponent;
41 * ```
42 */
43declare const DialogActions: {
44 (props: Props): React.JSX.Element;
45 displayName: string;
46};
47export default DialogActions;
48//# sourceMappingURL=DialogActions.d.ts.map
\No newline at end of file