wonsikin / react-native-barcode-builder

Component for generating barcode in react native app
Other
175 stars 116 forks source link

Background and lineColor don't seem to be accepted #11

Closed ghost closed 7 years ago

ghost commented 7 years ago

Packages:

"react": "16.0.0-alpha.6",
"react-native": "0.44.0",
"react-native-svg": "^5.1.8"

Have set the package without a problem and the barcode is being generated but the values for lineColor and background aren't taking effect.

import React, { Component } from 'react'
import { View, Dimensions } from 'react-native'
import Barcode from 'react-native-barcode-builder'

let width = Dimensions.get('window').width

export default class AppBarcode extends Component {
  constructor (props) {
    super(props)
  }
  render () {
    return (
      <View style={{
        flex: 1,
        marginHorizontal: 20,
        width: width * 0.8,
        marginVertical: 20,
        alignItems: 'center',
        flexDirection: 'column',
        justifyContent: 'center'}}>
        <Barcode value='4324324FVF' background='#ffffff' lineColor='#3fa2f7' text='None' format='CODE128'/>
      </View>
    )
  }
}
wonsikin commented 7 years ago

@alex-dotdev Hi, I fixed it, use the latest v1.0.1 version 83b86fd8-0f0b-4d2c-9d79-54f7d2b9eaa1

ghost commented 7 years ago

Tested v1.0.1 and all working! Thank you