diff --git a/docs/components/markdown/markdown.mdx b/docs/components/markdown/markdown.mdx index e8e9884..0464b92 100644 --- a/docs/components/markdown/markdown.mdx +++ b/docs/components/markdown/markdown.mdx @@ -110,6 +110,8 @@ body { You can use the `tocRenderer` prop to render a table of contents from your Markdown content. The headers will be automatically detected and rendered in the order they appear. You need to place the `` component in your Markdown content to render the table of contents. +You can also use the `id` attribute in your headers to link to them directly. +
diff --git a/docs/images/previews/ui-templates-invoice-advanced-089aa4f4/document.1.jpg b/docs/images/previews/ui-templates-invoice-advanced-657df4ea/document.1.jpg similarity index 100% rename from docs/images/previews/ui-templates-invoice-advanced-089aa4f4/document.1.jpg rename to docs/images/previews/ui-templates-invoice-advanced-657df4ea/document.1.jpg diff --git a/docs/images/previews/ui-templates-invoice-advanced-089aa4f4/document.pdf b/docs/images/previews/ui-templates-invoice-advanced-657df4ea/document.pdf similarity index 99% rename from docs/images/previews/ui-templates-invoice-advanced-089aa4f4/document.pdf rename to docs/images/previews/ui-templates-invoice-advanced-657df4ea/document.pdf index 21e7645..4ede634 100644 Binary files a/docs/images/previews/ui-templates-invoice-advanced-089aa4f4/document.pdf and b/docs/images/previews/ui-templates-invoice-advanced-657df4ea/document.pdf differ diff --git a/docs/images/previews/ui-templates-invoice-808342e7/document.1.jpg b/docs/images/previews/ui-templates-invoice-c1137a92/document.1.jpg similarity index 100% rename from docs/images/previews/ui-templates-invoice-808342e7/document.1.jpg rename to docs/images/previews/ui-templates-invoice-c1137a92/document.1.jpg diff --git a/docs/images/previews/ui-templates-invoice-808342e7/document.pdf b/docs/images/previews/ui-templates-invoice-c1137a92/document.pdf similarity index 99% rename from docs/images/previews/ui-templates-invoice-808342e7/document.pdf rename to docs/images/previews/ui-templates-invoice-c1137a92/document.pdf index 84a7188..bccb289 100644 Binary files a/docs/images/previews/ui-templates-invoice-808342e7/document.pdf and b/docs/images/previews/ui-templates-invoice-c1137a92/document.pdf differ diff --git a/docs/images/previews/ui-templates-receipt-4906d507/document.1.jpg b/docs/images/previews/ui-templates-receipt-644d535a/document.1.jpg similarity index 100% rename from docs/images/previews/ui-templates-receipt-4906d507/document.1.jpg rename to docs/images/previews/ui-templates-receipt-644d535a/document.1.jpg diff --git a/docs/images/previews/ui-templates-receipt-4906d507/document.pdf b/docs/images/previews/ui-templates-receipt-644d535a/document.pdf similarity index 99% rename from docs/images/previews/ui-templates-receipt-4906d507/document.pdf rename to docs/images/previews/ui-templates-receipt-644d535a/document.pdf index fbd3756..bf73aa4 100644 Binary files a/docs/images/previews/ui-templates-receipt-4906d507/document.pdf and b/docs/images/previews/ui-templates-receipt-644d535a/document.pdf differ diff --git a/docs/images/previews/ui-templates-scientific-report-31829950/document.1.jpg b/docs/images/previews/ui-templates-scientific-report-7f68dcf5/document.1.jpg similarity index 100% rename from docs/images/previews/ui-templates-scientific-report-31829950/document.1.jpg rename to docs/images/previews/ui-templates-scientific-report-7f68dcf5/document.1.jpg diff --git a/docs/images/previews/ui-templates-scientific-report-31829950/document.2.jpg b/docs/images/previews/ui-templates-scientific-report-7f68dcf5/document.2.jpg similarity index 100% rename from docs/images/previews/ui-templates-scientific-report-31829950/document.2.jpg rename to docs/images/previews/ui-templates-scientific-report-7f68dcf5/document.2.jpg diff --git a/docs/images/previews/ui-templates-scientific-report-31829950/document.pdf b/docs/images/previews/ui-templates-scientific-report-7f68dcf5/document.pdf similarity index 99% rename from docs/images/previews/ui-templates-scientific-report-31829950/document.pdf rename to docs/images/previews/ui-templates-scientific-report-7f68dcf5/document.pdf index 2cccda8..5fcebf1 100644 Binary files a/docs/images/previews/ui-templates-scientific-report-31829950/document.pdf and b/docs/images/previews/ui-templates-scientific-report-7f68dcf5/document.pdf differ diff --git a/docs/sortedDocs.json b/docs/sortedDocs.json index c6ab217..737f614 100644 --- a/docs/sortedDocs.json +++ b/docs/sortedDocs.json @@ -1 +1 @@ -[{"icon":"fa-solid fa-code","name":"compile","description":"Compile a React component to a string with the Onedoc print styles.","outputPath":"/Users/titouanlaunay/Documents/Onedoc/react-print/docs/components/compile","files":[{"name":"compile","baseName":"compile","path":"compile/compile.tsx","outputPath":"/Users/titouanlaunay/Documents/Onedoc/react-print/docs/components/compile/compile.mdx","markdown":"---\ntitle: compile\n\n\n---\n\nSupport\n\n
Client-side
Server-side
\n\n#### Preview\n\nA simple function to compile a React component to an HTML string with the Onedoc print styles.\n ```jsx\n const html = await compile();\n ```\n\n\n\n
\n\n```jsx\nimport { compile } from \"@fileforge/react-print\";\n\n\n
Hello World!
\n
;\n\n```\n
\n\n```css\n@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\");\n\nhtml,\nbody {\n font-size: 28px;\n font-family: \"Inter\", sans-serif;\n}\n\n@page {\n size: A4;\n}\n\n```\n\n
\n\n### Examples\n\n#### Emotion CSS\n\nPass `{ emotion: true }` as the second compile option to merge and extract critical CSS using Emotion. Some libraries such as Chakra UI require this option to work correctly.\n\n```jsx\nconst html = await compile(, { emotion: true });\n```\n\n\n\n
\n\n```jsx\nimport { compile } from \"@fileforge/react-print\";\nimport { Button, ChakraProvider, extendTheme } from \"@chakra-ui/react\";\n\n<>\n \n \n \n;\n\n```\n\n\n```css\n@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\");\n\nhtml,\nbody {\n font-size: 28px;\n font-family: \"Inter\", sans-serif;\n}\n\n@page {\n size: A4;\n}\n\n```\n\n
\n\n","config":{"name":"compile","description":"","components":{"compile":{"server":true,"client":true,"examples":{"default":{"description":"A simple function to compile a React component to an HTML string with the Onedoc print styles.\n ```jsx\n const html = await compile();\n ```","template":{"key":null,"ref":null,"props":{"children":{"type":"div","key":null,"ref":null,"props":{"className":"bg-red-400","children":"Hello World!"},"_owner":null,"_store":{}}},"_owner":null,"_store":{}},"templateString":"(\n \n
Hello World!
\n
\n )"},"emotion":{"description":"Pass `{ emotion: true }` as the second compile option to merge and extract critical CSS using Emotion. Some libraries such as Chakra UI require this option to work correctly.\n\n```jsx\nconst html = await compile(, { emotion: true });\n```","template":{"key":null,"ref":null,"props":{"children":{"key":null,"ref":null,"props":{"children":{"type":{},"key":null,"ref":null,"props":{"colorScheme":"blue","children":"Hello"},"_owner":null,"_store":{}}},"_owner":null,"_store":{}}},"_owner":null,"_store":{}},"name":"Emotion CSS","compileOptions":{"emotion":true},"externalImports":["import { Button, ChakraProvider, extendTheme } from \"@chakra-ui/react\";"],"templateString":"(\n <>\n \n \n \n \n )"}}}}}}]},{"icon":"fa-brands fa-css3-alt","name":"CSS","description":"Allows adding CSS to the document while securely parsing and escaping it.\n\nNB: While you can add regular CSS with the `