Skip to content

Instantly share code, notes, and snippets.

@shawn-kb
Created August 1, 2018 20:17
Show Gist options
  • Select an option

  • Save shawn-kb/eb045920831bf1292a27e7e36b186c12 to your computer and use it in GitHub Desktop.

Select an option

Save shawn-kb/eb045920831bf1292a27e7e36b186c12 to your computer and use it in GitHub Desktop.

Revisions

  1. skrite created this gist Aug 1, 2018.
    73 changes: 73 additions & 0 deletions controlScreen.js
    Original 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,
    },


    });