JSPM

@weknow/react-data-report

1.1.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q50690F
  • License GPL-3.0

ReactJS component to preview data and export it as PDF file.

Package Exports

  • @weknow/react-data-report

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@weknow/react-data-report) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-data-report

ReactJS component to preview data and export it as PDF file.

The user will be able to choose the items per page, the page format (portrait / landscape) and the page size (a4 / letter / legal).

Columns in table can be easily hide using style. Please refer to App.css to see an example.

Example:

Please refer to the test file to see how works.

To run the test:

  1. Clone the repository
  2. Execute in console:
cd test
npm install
cd node_modules
ln -s ../../ react-data-report
cd ..
npm start

General Usage

As you will be able to see in test in order to use the component we need to importe it as:

import Report from 'react-data-report';

Then, in the render method we can just call it like:

<Report data={example} opening={(<h1>This is an opening content.</h1>)}/>

Where data is an array of objects as you can see in this example file.

Installation

Install this component is easy, just use npm as:

npm install @weknow/react-data-report