-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from OnedocLabs/ffo-48-include-documentation-f…
…or-the-react-print-library-with Ffo 48 include documentation for the react print library with
- Loading branch information
Showing
18 changed files
with
193 additions
and
491 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: CurrentPageTop | ||
|
||
|
||
--- | ||
|
||
Displays content in the top of the current page. | ||
|
||
This component will override the content of the `PageTop` component for the current page. | ||
|
||
Support | ||
|
||
<div style={{ | ||
display: "grid", | ||
gridTemplateColumns: "repeat(2, 1fr)", | ||
gap: "0.5rem", | ||
}}><div className="flex items-center p-3 border rounded-md border-gray-700" style={{borderColor: '#374151'}}><svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5 mr-2" viewBox="0 0 512 512"><path fill="#22c55e" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg><span>Client-side</span></div><div className="flex items-center p-3 border rounded-md" style={{borderColor: '#374151'}}><svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5 mr-2" viewBox="0 0 512 512"><path fill="#22c55e" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg><span>Server-side</span></div></div> | ||
|
||
#### Preview | ||
|
||
<Frame background="subtle"><img src="../../images/previews/currentpagetop-9aae489e/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame> | ||
|
||
<div style={{paddingTop: "1rem", paddingBottom: "1rem"}}><CodeBlocks> | ||
<CodeBlock title="template.tsx"> | ||
```jsx | ||
import { CurrentPageTop } from "@fileforge/react-print"; | ||
|
||
<CurrentPageTop style={{ backgroundColor: "#bfdbfe" }} />; | ||
|
||
``` | ||
</CodeBlock> | ||
<CodeBlock title="styles.css"> | ||
```css | ||
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"); | ||
|
||
html, | ||
body { | ||
font-size: 28px; | ||
font-family: "Inter", sans-serif; | ||
} | ||
|
||
@page { | ||
size: A4; | ||
} | ||
|
||
``` | ||
</CodeBlock> | ||
</CodeBlocks></div> | ||
|
||
### Examples | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: NoBreak | ||
|
||
|
||
--- | ||
|
||
Prevents a page break. Wrap this component around content that should not be broken across pages. | ||
|
||
Support | ||
|
||
<div style={{ | ||
display: "grid", | ||
gridTemplateColumns: "repeat(2, 1fr)", | ||
gap: "0.5rem", | ||
}}><div className="flex items-center p-3 border rounded-md border-gray-700" style={{borderColor: '#374151'}}><svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5 mr-2" viewBox="0 0 512 512"><path fill="#22c55e" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg><span>Client-side</span></div><div className="flex items-center p-3 border rounded-md" style={{borderColor: '#374151'}}><svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5 mr-2" viewBox="0 0 512 512"><path fill="#22c55e" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg><span>Server-side</span></div></div> | ||
|
||
#### Preview | ||
|
||
<Frame background="subtle"><img src="../../images/previews/nobreak-d03f0d1f/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame> | ||
|
||
<div style={{paddingTop: "1rem", paddingBottom: "1rem"}}><CodeBlocks> | ||
<CodeBlock title="template.tsx"> | ||
```jsx | ||
import { NoBreak } from "@fileforge/react-print"; | ||
|
||
<NoBreak>This content will not be split between two pages.</NoBreak>; | ||
|
||
``` | ||
</CodeBlock> | ||
<CodeBlock title="styles.css"> | ||
```css | ||
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"); | ||
|
||
html, | ||
body { | ||
font-size: 28px; | ||
font-family: "Inter", sans-serif; | ||
} | ||
|
||
@page { | ||
size: A4; | ||
} | ||
|
||
``` | ||
</CodeBlock> | ||
</CodeBlocks></div> | ||
|
||
### Examples | ||
|
Oops, something went wrong.