npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-table-component-ll-oc

v0.0.1

Published

react-data-table-ll is a simple and flexible React table component for displaying data.

Downloads

3

Readme

React Data Table Component

react-data-table-ll is a simple and flexible React table component for displaying data.

Key Features

  • Declarative configuration
  • Built-in and configurable:
    • Sorting
    • Filtering
    • Pagination
  • Style Customizable

Installation

  npm install --save react-table-component-ll-oc

Usage

import

 import { DataTable } from 'react-table-component-ll-oc'

simple use

 const data = {
  columns: [
    {
      name:'Name',
      value:'name',
      type:'string',
      sortable:true
    },
    {
      name:'Age',
      value: 'age',
      type:'number',
      sortable:false
    }
  ],
  rows: [
    {
      name: 'Linh Dang',
      age: 36
    },
    { 
      name: 'Liam Dan',
      age: 1
    },
    {
      name: 'Bui Huu Kien',
      age: 35
    }
  ]
}

<DataTable data = {data} titleTbl = {'your title'}/>

Filtering and Pagination

paginationConfig = {
  nbrRows:6 
}

<DataTable data = {data} searchTbl pagination  paginationConfig={paginationConfig}/>

Style Customizable

style.css file

.table_title_ct{
  color: red;
}
.table_filter_ct{
  background: red;
}

component.jsx file

import './style.css';

styleCustom = {
      table_title: 'table_title_ct',
      table_filter: 'table_filter_ct'
}
<DataTable data = {data} titleTbl = {'your title'} searchTbl pagination  paginationConfig styleCustom={styleCustom}/>

style options

| prop | type | value | Description | | :----------------------------------------- |:---------:| :-----------------:|:---------------------------------------------------------------| | table_section | string | style class name | Section that contains the DataTable component | | table_container | string | style class name | The <div> element contains the content of the DataTable | | table_header | string | style class name | Header contains the title and filter of the table | | table_title | string | style class name | The title of the table | | table_filter | string | style class name | The filter of the table | | table_footer | string | style class name | Footer contains the pagination section | | table_contenu__table | string | style class name | The element <table> contain data of the table | | table_contenu__thead__tr | string | style class name | The element <tr> inside element <thead> of the table | | table_contenu__thead__th__icon__container | string | style class name | The icon container of the sorting section | | table_contenu__thead__th__icon__color | string | name of color | The icon color for sorting (Ex.: 'red') | | table_contenu__thead__th__icon__size | string | size of icon | The icon size for sorting (Ex.: '1.5rem') | | table_contenu__thead__th__container | string | style class name | The container for the header cell of each column | | table_contenu__thead__th__name | string | style class name | The title in the header cell of each column | | table_contenu__tbody__tr | string | style class name | The element <tr> in the element <tbody> of the table | | table_contenu__tbody__td | string | style class name | The element <td> in the element <tbody> of the table | | table_pagination__container | string | style class name | The container contains the content of the pagination section | | table_pagination__select__icon__color | string | name of color | The icon color in the select menu (Ex.: 'red') | | table_pagination__select__icon__size | string | size of icon | The icon size in the select menu (Ex.: '1.5rem') | | table_pagination__select__container | string | style class name | The container contains the select menu | | table_pagination__select__title | string | style class name | The title of the seclect menu | | table_pagination__select__options | string | style class name | The option of menu | | table_pagination__currentPage | string | style class name | The description of the actual data displayed | | table_pagination__arrows__container | string | style class name | The conatiner contains the arrows | | table_pagination__arrows__icon__color | string | name of color | The double arrow color in the pagination section (Ex.: 'red') | | table_pagination__arrows__icon__size | string | size of icon | The double arrow size in the pagination section (Ex.: '1.5rem')|

License