0.1.3 • Published 3 years ago

react-native-premium-table v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Battle Tested ✅

React Native Premium Table

npm version npm Platform - Android and iOS License: MIT styled with prettier

Installation

Add the dependency:

npm i react-native-premium-table

Peer Dependencies

"react-native-easy-grid": ">= 0.2.2"

Usage

Import

import PremiumTable, { Item } from "react-native-premium-table";

Fundamental Usage

<PremiumTable data={mockData} />

Data Format

const mockData = [
  {
    name: "Data Sync",
    isBasic: true,
    isPremium: true,
  },
  {
    name: "Offline Usage",
    isBasic: true,
    isPremium: true,
  },
  {
    name: "Share with Friends",
    isBasic: true,
    isPremium: true,
  },
  {
    name: "Unlimited Items",
    isBasic: false,
    isPremium: true,
  },
  {
    name: "Unlimited Lists",
    isBasic: false,
    isPremium: true,
  },
  {
    name: "Insight",
    isBasic: false,
    isPremium: true,
  },
  {
    name: "Custom App Icons",
    isBasic: false,
    isPremium: true,
  },
  {
    name: "Historical Access",
    isBasic: false,
    isPremium: true,
  },
  {
    name: "Priority Support",
    isBasic: false,
    isPremium: true,
  },
];

Example Project 😍

You can checkout the example project 🥰

Simply run

  • npm i
  • react-native run-ios/android

should work of the example project.

Configuration - Props

Fundamentals

PropertyTypeDefaultDescription
dataItem[]undefinedset the formatted data

Customization (Optionals)

PropertyTypeDefaultDescription
styleViewStyledefaultset or override the style object for the main container
headerStyleViewStyledefaultset or override the style object for the header
basicTextstring"Basic"change the basic column's text
premiumTextstring"Premium"change the premium column's text
checkCircleStyleViewStyledefaultset or override the style object for the check circle
iconImageStyleImageStyledefaultset or override the style object for the icon image
titleTextStyleTextStyledefaultset or override the style object for the title text
itemTextStyleTextStyledefaultset or override the style object for the item text
checkImageSourceImageSourcePropTypedefaultset your own check image
lockImageSourceImageSourcePropTypedefaultset your own lock image

Future Plans

  • LICENSE
  • Write an article about the lib on Medium

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Premium Table is available under the MIT license. See the LICENSE file for more info.