@garage-panda/react-pdf-export
Advanced tools
Comparing version 0.0.4-alpha to 0.1.0
{ | ||
"name": "@garage-panda/react-pdf-export", | ||
"version": "0.0.4-alpha", | ||
"version": "0.1.0", | ||
"description": "A PDF generator for React applications", | ||
@@ -35,3 +35,6 @@ "main": "lib/index.js", | ||
"react-dom": ">=16.8.0" | ||
}, | ||
"dependencies": { | ||
"@garage-panda/use-await-dom-render": "0.0.5" | ||
} | ||
} |
@@ -42,9 +42,8 @@ # Important | ||
<button onClick={generatePdf}>Click me</button> | ||
<PdfExport containerRef={containerRef} options={{ | ||
styles: ['https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css'], | ||
scripts: ['https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'] | ||
}}> | ||
<PdfExport containerRef={containerRef}> | ||
<h1>This is the content of the PDF in here</h1> | ||
<p>Yes, you can put any child</p> | ||
<div>Because it's awesome!</div> | ||
<div> | ||
<p>Yes, you can put any child</p> | ||
<div>Because it's awesome!</div> | ||
</div> | ||
</PdfExport> | ||
@@ -58,2 +57,12 @@ </React.Fragment> | ||
### Available optional props | ||
| Prop | Type | Default | Description | Optional | | ||
|-----------|-------------|--------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------| | ||
| className | string | none | A custom class passed down to the iframe container | yes | | ||
| showInDom | boolean | true | Show the preview of the PDF in the DOM | yes | | ||
| lazyLoad | boolean | false | In the lazy load mode the content of the PDF is added to the DOM when you call generatePdf and is cleared afterwards. In non-lazy load the content is added to the DOM when the page is rendered | yes | | ||
| options | HeadOptions | { styles: [], scripts: [], includeParentStyles: true } | Styles and scripts loaded only in the iframe | yes | | ||
## Contributing | ||
@@ -60,0 +69,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
13542
14
205
72
1
3
+ Added@garage-panda/use-await-dom-render@0.0.5(transitive)