import { forwardRef, memo, ReactNode, ComponentPropsWithRef, ComponentType } from 'react'; import { Text, type StyleProp, type TextProps, type TextStyle } from 'react-native'; import { dialogTitleStyles } from './utils'; export type Props = ComponentPropsWithRef> & { /** * Title text for the `DialogTitle`. */ children: ReactNode; style?: StyleProp; }; /** * 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, style, ...rest }: Props, ref: any) => { return ( {children} ); }; DialogTitle.displayName = 'Dialog_Title'; export default memo(forwardRef(DialogTitle));