From b448b2537d1931fbc1e3890321af6f2603bfc67e Mon Sep 17 00:00:00 2001 From: lesmaux Date: Sat, 29 Sep 2018 23:01:48 +1200 Subject: [PATCH] added room input modal --- components/room-input.js | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) 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