UNPKG

react-native-paper

Version:
42 lines 1.36 kB
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, 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