Back to React Native Paper

DialogTitle

docs/public/1.0/dialog-title.html

5.15.1811 B
Original Source

DialogTitle

A component to show a title in a Dialog.

Usage

js
import * as React from 'react';
import { Dialog, DialogContent, DialogTitle, Paragraph } from 'react-native-paper';

export default class MyComponent extends React.Component {
  state = {
    visible: false,
  };

  _hideDialog = () => this.setState({ visible: false });

  render() {
    return (
      <Dialog
        visible={this.state.visible}
        onDismiss={this._hideDialog}>
        <DialogTitle>This is a title</DialogTitle>
        <DialogContent>
          <Paragraph>This is simple dialog</Paragraph>
        </DialogContent>
      </Dialog>
    );
  }
}

Props

children (required) Type: React.Node

Title text for the DialogTitle.

style Type: any

theme Type: Theme