Skip to content

Commit

Permalink
Merge branch 'master' of github.com:VittoriDavide/react-native-barcod…
Browse files Browse the repository at this point in the history
…e-creator
  • Loading branch information
VittoriDavide committed Aug 21, 2021
2 parents 1547165 + 88e387e commit cf8dc99
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,34 @@ Component to generate QRCode, Code128, PDF417 or AZTEC natively for react native
```sh
npm install react-native-barcode-creator
```
Go to your ios folder and run:
```sh
pod install
```

## Usage

```js
import BarcodeCreator from "react-native-barcode-creator";
import BarcodeCreatorViewManager, { BarcodeFormat } from 'react-native-barcode-creator';

<BarcodeCreatorViewManager
value={"100"}
background={"#000000"}
foregroundColor={"#FFFFFF"}
format={BarcodeFormat.QR}
style={styles.box} />

```

// ...
## Props

const result = await BarcodeCreator.multiply(3, 7);
```
| Prop | Description | Default |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **`value`** | **Mandatory** - The content to add to the Barcode. | _None_ |
| **`style`** | Style attributes for the view, as expected in a standard [`View`](https://facebook.github.io/react-native/docs/layout-props.html). | _None_ |
| **`format`** | **Mandatory** The format to show in the Barcode, it can be QR, AZTEC, PDF417, CODE128. | `BarcodeFormat.QR` |
| **`background`** | The Background Color of the Barcode. | `white` |
| **`foregroundColor`** | The foreground color to use on the Barcode. | `black`

## Contributing

Expand Down

0 comments on commit cf8dc99

Please sign in to comment.