Skip to content

Commit 83148c1

Browse files
committed
Adds the three missing shell components to the docsConfig
1 parent 2c15a30 commit 83148c1

File tree

12 files changed

+181
-1
lines changed

12 files changed

+181
-1
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: CurrentPageTop
3+
4+
5+
---
6+
7+
Displays content in the top of the current page.
8+
9+
This component will override the content of the `PageTop` component for the current page.
10+
11+
Support
12+
13+
<div style={{
14+
display: "grid",
15+
gridTemplateColumns: "repeat(2, 1fr)",
16+
gap: "0.5rem",
17+
}}><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>
18+
19+
#### Preview
20+
21+
<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>
22+
23+
<div style={{paddingTop: "1rem", paddingBottom: "1rem"}}><CodeBlocks>
24+
<CodeBlock title="template.tsx">
25+
```jsx
26+
import { CurrentPageTop } from "@fileforge/react-print";
27+
28+
<CurrentPageTop style={{ backgroundColor: "#bfdbfe" }} />;
29+
30+
```
31+
</CodeBlock>
32+
<CodeBlock title="styles.css">
33+
```css
34+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");
35+
36+
html,
37+
body {
38+
font-size: 28px;
39+
font-family: "Inter", sans-serif;
40+
}
41+
42+
@page {
43+
size: A4;
44+
}
45+
46+
```
47+
</CodeBlock>
48+
</CodeBlocks></div>
49+
50+
### Examples
51+

docs/components/shell/nobreak.mdx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: NoBreak
3+
4+
5+
---
6+
7+
Prevents a page break. Wrap this component around content that should not be broken across pages.
8+
9+
Support
10+
11+
<div style={{
12+
display: "grid",
13+
gridTemplateColumns: "repeat(2, 1fr)",
14+
gap: "0.5rem",
15+
}}><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>
16+
17+
#### Preview
18+
19+
<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>
20+
21+
<div style={{paddingTop: "1rem", paddingBottom: "1rem"}}><CodeBlocks>
22+
<CodeBlock title="template.tsx">
23+
```jsx
24+
import { NoBreak } from "@fileforge/react-print";
25+
26+
<NoBreak>This content will not be split between two pages.</NoBreak>;
27+
28+
```
29+
</CodeBlock>
30+
<CodeBlock title="styles.css">
31+
```css
32+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");
33+
34+
html,
35+
body {
36+
font-size: 28px;
37+
font-family: "Inter", sans-serif;
38+
}
39+
40+
@page {
41+
size: A4;
42+
}
43+
44+
```
45+
</CodeBlock>
46+
</CodeBlocks></div>
47+
48+
### Examples
49+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: PageBreak
3+
4+
5+
---
6+
7+
Forces a page break.
8+
9+
Support
10+
11+
<div style={{
12+
display: "grid",
13+
gridTemplateColumns: "repeat(2, 1fr)",
14+
gap: "0.5rem",
15+
}}><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>
16+
17+
#### Preview
18+
19+
<Frame background="subtle"><img src="../../images/previews/pagebreak-88acdbdf/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
20+
21+
<div style={{paddingTop: "1rem", paddingBottom: "1rem"}}><CodeBlocks>
22+
<CodeBlock title="template.tsx">
23+
```jsx
24+
import { PageBreak } from "@fileforge/react-print";
25+
26+
<div>
27+
<div>Hello on this page</div>
28+
<PageBreak />
29+
<div>World on that page</div>
30+
</div>;
31+
32+
```
33+
</CodeBlock>
34+
<CodeBlock title="styles.css">
35+
```css
36+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");
37+
38+
html,
39+
body {
40+
font-size: 28px;
41+
font-family: "Inter", sans-serif;
42+
}
43+
44+
@page {
45+
size: A4;
46+
}
47+
48+
```
49+
</CodeBlock>
50+
</CodeBlocks></div>
51+
52+
### Examples
53+
20.1 KB
Loading
4.69 KB
Binary file not shown.
40.8 KB
Loading
5.08 KB
Binary file not shown.
27.8 KB
Loading
28.6 KB
Loading
5.46 KB
Binary file not shown.

0 commit comments

Comments
 (0)