react-native-paper
Version:
Material design for React Native
48 lines • 1.26 kB
TypeScript
import * as React from 'react';
import { StyleProp, View, ViewStyle } from 'react-native';
import type { ThemeProp } from 'src/types';
export type Props = React.ComponentPropsWithRef<typeof View> & {
/**
* Content of the `DialogActions`.
*/
children: React.ReactNode;
style?: StyleProp<ViewStyle>;
/**
* @optional
*/
theme?: ThemeProp;
};
/**
* A component to show a list of actions in a Dialog.
*
* ## Usage
* ```js
* import * as React from 'react';
* import { Button, Dialog, Portal } from 'react-native-paper';
*
* const MyComponent = () => {
* const [visible, setVisible] = React.useState(false);
*
* const hideDialog = () => setVisible(false);
*
* return (
* <Portal>
* <Dialog visible={visible} onDismiss={hideDialog}>
* <Dialog.Actions>
* <Button onPress={() => console.log('Cancel')}>Cancel</Button>
* <Button onPress={() => console.log('Ok')}>Ok</Button>
* </Dialog.Actions>
* </Dialog>
* </Portal>
* );
* };
*
* export default MyComponent;
* ```
*/
declare const DialogActions: {
(props: Props): React.JSX.Element;
displayName: string;
};
export default DialogActions;
//# sourceMappingURL=DialogActions.d.ts.map