getTextAttachmentDialog()

in TestAppTypescript/src/CrashesScreen.tsx [132:169]


  getTextAttachmentDialog() {
    return (
      <DialogComponent
        ref={(dialogComponent: any) => {
          this.dialogComponent = dialogComponent;
        }}
        width={0.9}
      >
        <View>
          <TextInput
            style={SharedStyles.dialogInput}
            onChangeText={text => this.setState({ textAttachment: text })}
          />
          <View style={SharedStyles.dialogButtonContainer}>
            <TouchableOpacity
              style={SharedStyles.dialogButton}
              onPress={() => {
                AttachmentsProvider.saveTextAttachment(
                  this.state.textAttachment
                );
                this.dialogComponent.dismiss();
              }}
            >
              <Text style={styles.button}>Save</Text>
            </TouchableOpacity>
            <TouchableOpacity
              style={SharedStyles.dialogButton}
              onPress={() => {
                this.dialogComponent.dismiss();
              }}
            >
              <Text style={styles.button}>Cancel</Text>
            </TouchableOpacity>
          </View>
        </View>
      </DialogComponent>
    );
  }