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