Skip to main content

Dialog.Title

A component to show a title in a Dialog.

Usage

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.Title>This is a title</Dialog.Title>
<Dialog.Content>
<Text variant="bodyMedium">This is simple dialog</Text>
</Dialog.Content>
</Dialog>
</Portal>
);
};

export default MyComponent;

Props

children (required)

Type: React.ReactNode

Title text for the DialogTitle.

style

theme

Type: ThemeProp