UNPKG

react-native-paper

Version:
42 lines 1.43 kB
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } import * as React from 'react'; import { View, StyleSheet } from 'react-native'; /** * A component to show content in a Dialog. * * ## Usage * ```js * import * as React from 'react'; * import { Dialog, Portal, Text } from 'react-native-paper'; * * const MyComponent = () => { * const [visible, setVisible] = React.useState(false); * * const hideDialog = () => setVisible(false); * * return ( * <Portal> * <Dialog visible={visible} onDismiss={hideDialog}> * <Dialog.Content> * <Text variant="bodyMedium">This is simple dialog</Text> * </Dialog.Content> * </Dialog> * </Portal> * ); * }; * * export default MyComponent; * ``` */ const DialogContent = props => /*#__PURE__*/React.createElement(View, _extends({}, props, { style: [styles.container, props.style] }), props.children); DialogContent.displayName = 'Dialog.Content'; const styles = StyleSheet.create({ container: { paddingBottom: 24, paddingHorizontal: 24 } }); export default DialogContent; //# sourceMappingURL=DialogContent.js.map