@fortawesome/free-solid-svg-icons#faBolt JavaScript Examples

The following examples show how to use @fortawesome/free-solid-svg-icons#faBolt. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Scanner.js    From Spring2020_MyFood_FrontEnd with GNU General Public License v3.0 6 votes vote down vote up
render() {
    return (
      <View style={styles.container}>
        <RNCamera
          ref={ref => {
                this.camera = ref;
              }
          }
          autoFocus={true}
          captureAudio={false}
          style={styles.preview}
          type={RNCamera.Constants.Type.back}
          flashMode={this.state.flashMode}
          androidCameraPermissionOptions={{
            title: 'Permission to use camera',
            message: 'We need your permission to use your camera',
            buttonPositive: 'Ok',
            buttonNegative: 'Cancel',
          }}
        />
        <View style={{ flex: 0, flexDirection: 'row' }}>
          <View style={{ flex: 1, flexDirection: 'row', }}>
            <TouchableOpacity onPress={this.toggleFlash} style={styles.flash}>
              {this.state.flashMode == RNCamera.Constants.FlashMode.off
                ? <FontAwesomeIcon icon={ faBolt } style={{color: "black"}} />
                : <FontAwesomeIcon icon={ faBolt } style={{color: "yellow"}} />
              }
            </TouchableOpacity>
          </View>
          <View style={{ flex: 2, flexDirection: 'row', }}>
            <TouchableOpacity onPress={this.takePicture.bind(this)} style={styles.scan}>
              <Text>Scan</Text>
            </TouchableOpacity>
          </View>
        </View>
      </View>
    );
  }