react-jsbarcode 0.1.2 → 0.2.3-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.2.3-beta.0](https://github.com/iamchathu/react-jsbarcode/compare/v0.2.2...v0.2.3-beta.0) (2021-10-12)
6
+
7
+ ### [0.2.2](https://github.com/iamchathu/react-jsbarcode/compare/v0.2.1...v0.2.2) (2021-10-08)
8
+
9
+ ### Features
10
+
11
+ - add className and style support ([cd4d63a](https://github.com/iamchathu/react-jsbarcode/commit/cd4d63ac6a42ba2401f95898c548c318aed7dca3))
12
+
13
+ ### [0.2.1](https://github.com/iamchathu/react-jsbarcode/compare/v0.2.0...v0.2.1) (2021-10-07)
14
+
15
+ ### Bug Fixes
16
+
17
+ - make options optional prop ([0bc6f4b](https://github.com/iamchathu/react-jsbarcode/commit/0bc6f4b3cb41efbc97f71495f2f9f8f40775353e))
18
+
19
+ ## [0.2.0](https://github.com/iamchathu/react-jsbarcode/compare/v0.1.2...v0.2.0) (2021-10-07)
20
+
21
+ ### ⚠ BREAKING CHANGES
22
+
23
+ - move jsbarcode as dependacy rather than peer
24
+
25
+ ### Features
26
+
27
+ - move jsbarcode as dependacy rather than peer ([4730d31](https://github.com/iamchathu/react-jsbarcode/commit/4730d3167ae6c2fff2451b7083862069bbd674a6))
28
+
5
29
  ### [0.1.2](https://github.com/iamchathu/react-jsbarcode/compare/v0.1.1...v0.1.2) (2021-10-07)
6
30
 
7
31
  ### Bug Fixes
package/Readme.md CHANGED
@@ -9,29 +9,41 @@
9
9
 
10
10
  ## About
11
11
 
12
- This is a [React](https://reactjs.org) component wrapping up [jsbarcode](<[https://](https://github.com/lindell/JsBarcode)>):
12
+ This is a [React](https://reactjs.org) component wrapping up [jsbarcode](<[https://](https://github.com/lindell/JsBarcode)>). Written as a React functional component using React hooks. <ReactBarcode />
13
13
 
14
14
  ## Installation
15
15
 
16
16
  using NPM
17
17
 
18
18
  ```bash
19
- npm i react-jsbarcode jsbarcode
19
+ npm i react-jsbarcode
20
20
  ```
21
21
 
22
22
  using yarn
23
23
 
24
24
  ```bash
25
- yarn add react-jsbarcode jsbarcode
25
+ yarn add react-jsbarcode
26
26
  ```
27
27
 
28
28
  ## Usage
29
29
 
30
+ - Basic usage
31
+
32
+ ```tsx
33
+ import ReactBarcode from 'react-jsbarcode';
34
+
35
+ const App = () => {
36
+ return <ReactBarcode value="ABC123" />;
37
+ };
38
+ ```
39
+
40
+ - Advanced usage
41
+
30
42
  ```tsx
31
- import ReactJSBarcode from 'react-jsbarcode';
43
+ import ReactBarcode from 'react-jsbarcode';
32
44
 
33
45
  const App = () => {
34
- return <ReactJSBarcode value="ABC123" options={{ format: 'code128' }} renderer="svg" />;
46
+ return <ReactBarcode value="ABC123" options={{ format: 'code128' }} renderer="svg" />;
35
47
  };
36
48
  ```
37
49
 
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import { Options } from 'jsbarcode';
3
3
  export declare const enum Renderer {
4
4
  svg = "svg",
@@ -8,9 +8,10 @@ export declare const enum Renderer {
8
8
  export interface ReactBarcodeProps {
9
9
  renderer?: Renderer;
10
10
  value: string;
11
- options: Options;
11
+ options?: Options;
12
+ style?: React.CSSProperties;
13
+ className?: string;
12
14
  }
13
15
  export { Options };
14
- declare const ReactBarcode: ({ value, options, renderer }: ReactBarcodeProps) => JSX.Element;
16
+ declare const ReactBarcode: ({ style, className, value, options, renderer }: ReactBarcodeProps) => JSX.Element;
15
17
  export default ReactBarcode;
16
- //# sourceMappingURL=index.d.ts.map