Skip to content

Commit

Permalink
Merge branch 'main' of github.com:OnedocLabs/react-print
Browse files Browse the repository at this point in the history
  • Loading branch information
Titou325 committed Feb 3, 2024
2 parents c62ba9a + a6dca10 commit 4fc03ba
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 4 deletions.
Empty file added .npmignore
Empty file.
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,57 @@
# @onedoc/react-print
---
# Getting started

react-print
## 1. Installation

Get the react-print component library.

<CodeGroup>

```sh npm
npm install -s @onedoc/react-print
```

```sh yarn
yarn add @onedoc/react-print
```

```sh pnpm
pnpm add @onedoc/react-print
```

</CodeGroup>

## 2. Import component

Import a component as follow:

```javascript
import { PageTop, PageBottom, PageBreak } from '@onedoc/react-print';
```

## 3. Integrate in your document:


```javascript
export const document = ({props}) => {
return (
<div>
<PageTop>
<span>Hello #1</span>
</PageTop>
<div>
Hello #2
</div>
<PageBottom>
<div className="text-gray-400 text-sm">
Hello #3
</div>
</PageBottom>
<PageBreak />
<span>Hello #4, but on a new page ! </span>
</div>
);
};
```
---
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onedoc/react-print",
"version": "0.1.4",
"version": "0.1.9",
"description": "Onedoc components for JavaScript React",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down

0 comments on commit 4fc03ba

Please sign in to comment.