Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@garage-panda/react-pdf-export

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@garage-panda/react-pdf-export - npm Package Compare versions

Comparing version 0.0.4-alpha to 0.1.0

lib/components/PdfExport.d.ts

5

package.json
{
"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"
}
}

21

README.md

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc