Created
August 1, 2018 20:17
-
-
Save shawn-kb/eb045920831bf1292a27e7e36b186c12 to your computer and use it in GitHub Desktop.
Revisions
-
skrite created this gist
Aug 1, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,73 @@ <Modal isVisible={this.state.confirmModalVisible} backdropColor={'orange'} backdropOpacity={1} animationType={'slide'} > <View > <Text> {this.state.activeCommandText} </Text> <View style={styles.row} > <Button backgroundColor="green" onPress={() => this.sendSimpleCommand()} title="Confirm" containerViewStyle={styles.button} /> <Button backgroundColor="red" onPress={() => this.cancelCommand()} title="Cancel" containerViewStyle={styles.button} /> </View> </View> </Modal> onst styles = StyleSheet.create({ modalView: { backgroundColor: 'white', padding: 22, justifyContent: 'center', alignItems: 'center', borderRadius: 4, borderColor: 'rgba(0, 0, 0, 0.1)', }, confirmModal: { paddingTop: '40%', paddingBottom: '20%', flexDirection: "column", justifyContent: "center", }, confirmSpeedSetModal: { paddingTop: '40%', paddingBottom: '20%', flexDirection: "column", justifyContent: "center", }, confirmButton: { backgroundColor: 'lightblue', padding: 12, margin: 16, justifyContent: 'center', alignItems: 'center', borderRadius: 4, borderColor: 'rgba(0, 0, 0, 0.1)', }, cancelButton: { backgroundColor: "red", paddingVertical: 3, alignItems: "center", justifyContent: "center", marginTop: 3, }, });