0.1.0 • Published 4 years ago

@medely/pdf v0.1.0

Weekly downloads
2
License
Repository
github
Last release
4 years ago

medely-pdf

Install

npm install --save Medely/medely-pdf

to specify release, update package.json:

"medely-pdf": "github:Medely/medely-pdf#v0.1.1",

Usage

check react-pdf

import { Template } from "medely-pdf";
import { PDFDownloadLink, Document } from "@react-pdf/renderer";

const MyDoc = () => (
  <Document>
    <Template />
  </Document>
);

const App = () => (
  <div>
    <PDFDownloadLink document={<MyDoc />} fileName="somename.pdf">
      {({ blob, url, loading, error }) =>
        loading ? "Loading document..." : "Download now!"
      }
    </PDFDownloadLink>
  </div>
);
0.1.0

4 years ago