@acaciomartins/react-native-simpletable

A Simple Table component for React Native

Usage no npm install needed!

<script type="module">
  import acaciomartinsReactNativeSimpletable from 'https://cdn.skypack.dev/@acaciomartins/react-native-simpletable';
</script>

README

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