@alckor127/react-button-export-excel

1.0.5 • Public • Published

@alckor127/react-button-export-excel

Button component to export a json array to excel.

NPM JavaScript Style Guide

Install

npm install --save @alckor127/react-button-export-excel

Usage

import React, { Component } from 'react'

import { ButtonExportExcel } from '@alckor127/react-button-export-excel'
import '@alckor127/react-button-export-excel/dist/index.css'

const data = [
  { name: 'John Doe', sex: 'M', age: 28 },
  { name: 'Jane Doe', sex: 'F', age: 27 }
]

class App extends Component {
  render() {
    return (
      <ButtonExportExcel outline data={data} filename='example'>
        ¡Export now!
      </ButtonExportExcel>
    )
  }
}

Props

  • data - is the the json array for the export.
  • filename - is the file name.
  • outline - is the outline style from button.
  • innerRef - is the reference from react.
  • disabled - is when the button is disabled.
  • dark - is the dark style from button.
  • light - is the light style from button.

License

MIT License. Copyright © Alckor127 2020

Readme

Keywords

Package Sidebar

Install

npm i @alckor127/react-button-export-excel

Weekly Downloads

19

Version

1.0.5

License

MIT

Unpacked Size

17.1 kB

Total Files

7

Last publish

Collaborators

  • alckor127