@acaciomartins/react-native-simpletable

0.0.2 • Public • Published

@acaciomartins/react-native-simpletable

A React Native Simple Table is a component React Native.

Instructions to Install

npm install @acaciomartins/react-native-simpletable

Instructions to Usage

import SimpleTable from '@acaciomartins/react-native-simpletable';
const headerName = [{ name: "Name", size: 70 }, { name: "Description", size: 120 }, { name: "Amount", size: 80 }, { name: "Price", size: 70 }];
const columnName = ["name", "description", "amount", "price"];
const tableData = [
  { name: "Product 1", description: "Description Product 1", price: "1,99", amount: "1" }, 
  { name: "Product 2", description: "Description Product 2", price: "2,99", amount: "2" }];
    
<SimpleTable
    data={tableData}
    headerName={headerName}
    columnName={columnName}
/>

Props

  • data
  • headerName
  • columnName
Prop Type Default Description Example
data Array - Data displayed in the table [{ name: "Product 1", description: "Description Product 1", price: "1,99", amount: "1" },{ name: "Product 2", description: "Description Product 2", price: "2,99", amount: "2" }]
headerName Array - Headers names and headers size [{ name: "Name", size: 70 }, { name: "Description", size: 120 }, { name: "Amount", size: 80 }, { name: "Price", size: 70 }]
columnName Array - Columns names ["name", "description", "amount", "price"]

Package Sidebar

Install

npm i @acaciomartins/react-native-simpletable

Weekly Downloads

2

Version

0.0.2

License

none

Unpacked Size

9.16 MB

Total Files

67

Last publish

Collaborators

  • acaciomartins