diff --git a/components/room-input.js b/components/room-input.js index e69de29..0801bd6 100644 --- a/components/room-input.js +++ b/components/room-input.js @@ -0,0 +1,46 @@ +import React, {Component} from 'react'; +import {Modal, Text, TouchableHighlight, View, Alert} from 'react-native'; + +class RoomInput extends Component { + state = { + modalVisible: false, + }; + + setModalVisible(visible) { + this.setState({modalVisible: visible}); + } + + render() { + return ( + + { + Alert.alert('Modal has been closed.'); + }}> + + + Hello World! + + { + this.setModalVisible(!this.state.modalVisible); + }}> + Hide ModalW + + + + + + { + this.setModalVisible(true); + }}> + Show Modal + + + ); + } +} \ No newline at end of file