import * as React from 'react'; import { StyleSheet, StyleProp, TextStyle } from 'react-native'; import Title from '../Typography/Title'; import { withTheme } from '../../core/theming'; type Props = React.ComponentPropsWithRef & { /** * Title text for the `DialogTitle`. */ children: React.ReactNode; style?: StyleProp; /** * @optional */ theme: ReactNativePaper.Theme; }; /** * A component to show a title in a Dialog. * *
*
* *
*
* * ## Usage * ```js * import * as React from 'react'; * import { Paragraph, Dialog, Portal } from 'react-native-paper'; * * const MyComponent = () => { * const [visible, setVisible] = React.useState(false); * * const hideDialog = () => setVisible(false); * * return ( * * * This is a title * * This is simple dialog * * * * ); * }; * * export default MyComponent; * ``` */ const DialogTitle = ({ children, theme, style, ...rest }: Props) => ( {children} ); DialogTitle.displayName = 'Dialog.Title'; const styles = StyleSheet.create({ text: { marginTop: 22, marginBottom: 18, marginHorizontal: 24, }, }); export default withTheme(DialogTitle); // @component-docs ignore-next-line export { DialogTitle };