Skip to content

Commit

Permalink
Updates READNE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredge committed Feb 2, 2024
1 parent 3be3d86 commit 2e30037
Showing 1 changed file with 63 additions and 1 deletion.
64 changes: 63 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,63 @@
# @onedoc/react-print
---
title: Introduction
description: Build PDFs using React and TypeScript.
icon: react
---

---
# 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>
);
};
```
---

0 comments on commit 2e30037

Please sign in to comment.