react-barcode icon indicating copy to clipboard operation
react-barcode copied to clipboard

How to add the options to the Barcode component?

Open SienaSantos opened this issue 6 years ago • 1 comments

var barCodeOptions = {    
    width: 2,
    height: 100,
    format: "CODE128",
    displayValue: true,
    fontOptions: "",
    font: "monospace",
    textAlign: "center",
    textPosition: "bottom",
    textMargin: 2,
    fontSize: 20,
    background: "#ffffff",
    lineColor: "#000000",
    margin: 10,
    marginTop: undefined,
    marginBottom: undefined,
    marginLeft: undefined,
    marginRight: undefined      
}


------

<Barcode options={barCodeOptions} value={row.itemCodes}/>

This doesn't work.

SienaSantos avatar Sep 16 '19 11:09 SienaSantos

Try this

<Barcode {...barCodeOptions} value={row.itemCodes}/>

ussada avatar Oct 16 '19 07:10 ussada