diff --git a/docs/modal.md b/docs/modal.md index 673fb545932f04..86d6058baeb04f 100644 --- a/docs/modal.md +++ b/docs/modal.md @@ -7,6 +7,70 @@ permalink: docs/modal.html next: navigatorios previous: maskedviewios --- + +Minimal modal example: + +``` +import React, { Component } from 'react'; +import { Text, View, Button, Modal, StyleSheet } from 'react-native'; + +export default class MyComponent extends Component { + state = { + modalVisible: false, + }; + + openModal() { + this.setState({modalVisible:true}); + } + + closeModal() { + this.setState({modalVisible:false}); + } + + render() { + return ( + + this.closeModal()} + > + + + This is content inside of modal component + + + + +