2020-10-16 10:22:02 +07:00
|
|
|
# @cubetiq/invoice-print
|
|
|
|
|
2020-10-16 11:09:30 +07:00
|
|
|
> Invoice Print 80mn using pdfmake
|
2020-10-16 10:22:02 +07:00
|
|
|
|
|
|
|
[![NPM](https://img.shields.io/npm/v/@cubetiq/invoice-print.svg)](https://www.npmjs.com/package/@cubetiq/invoice-print) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm install --save @cubetiq/invoice-print
|
|
|
|
```
|
|
|
|
|
2020-10-16 11:06:10 +07:00
|
|
|
OR Using YARN
|
|
|
|
```bash
|
|
|
|
yarn add @cubetiq/invoice-print
|
|
|
|
```
|
|
|
|
|
2020-10-16 10:22:02 +07:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
```tsx
|
2020-10-16 15:10:34 +07:00
|
|
|
import React from 'react'
|
|
|
|
import "invoice-print/dist/index.css"
|
|
|
|
import { useDoc } from 'invoice-print'
|
|
|
|
import { mockDataV2 } from './MockData'
|
|
|
|
|
|
|
|
const App = () => {
|
|
|
|
const invoicePrint = useDoc(mockDataV2)
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<button children={"Click Me"} onClick={()=> invoicePrint.print()}/>
|
|
|
|
</div>
|
|
|
|
)
|
2020-10-16 10:22:02 +07:00
|
|
|
}
|
2020-10-16 15:10:34 +07:00
|
|
|
|
|
|
|
export default App
|
2020-10-16 10:22:02 +07:00
|
|
|
```
|
|
|
|
|
2020-10-16 11:06:10 +07:00
|
|
|
### Contributors
|
|
|
|
Project's repository: [Library Invoice Print](https://git.cubetiqs.com/CUBETIQ/lib-invoice-print.git)
|
|
|
|
- [@chanthasuon](https://git.cubetiqs.com/chanthasuon)
|
|
|
|
- [@s.long](https://git.cubetiqs.com/s.long)
|
|
|
|
- [@sombochea](https://git.cubetiqs.com/sombochea)
|
|
|
|
- [@cubetiq](https://git.cubetiqs.com/CUBETIQ)
|
|
|
|
|
2020-10-16 10:22:02 +07:00
|
|
|
## License
|
2020-10-16 11:06:10 +07:00
|
|
|
@CUBETIQ
|
2020-10-16 10:22:02 +07:00
|
|
|
|
2020-10-16 11:09:30 +07:00
|
|
|
MIT © [Chantha Suon](https://git.cubetiqs.com/chanthasuon)
|