1.0.32 ā€¢ Published 3 years ago

xs-react-table v1.0.32

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

A small, simple and headless UI react table. It's up to you to define the shape, attributes, eventlisteners, styles, ... of every single element of your table.

Installation

  npm i xs-react-table

  yarn add xs-react-table

  import { Table } from 'xs-react-table'

Demo

Code Sandbox

Basic Usage

Define thead, tbody and tfoot using this basic skeleton:

  {
    tr: {
      rows: [
        {
          td: {
            cols: [
              {
                content: "Your Text Here",
              }
            ]
          }
        },
      ]
    }
  }

Example:

  const head = {
    tr: {
      rows: [
        {
          td: {
            cols: [
              {
                content: "First Name",
              },
              {
                content: "Last Name",
              },
            ]
          }
        },
      ]
    }
  }


  const body = {
    tr: {
      rows: [
        {
          td: {
            cols: [
              {
                content: "John",
              },
              {
                content: "Doe",
              },
            ]
          }
        },
        {
          td: {
            cols: [
              {
                content: "Jane",
              },
              {
                content: "Doe",
              },
            ]
          }
        },
      ]
    }
  }


  const foot = {
    tr: {
      rows: [
        {
          td: {
            cols: [
              {
                content: "Whatever",
              },
              {
                content: "You",
              },
              {
                content: "Like",
              },
            ]
          }
        }
      ]
    }
  }

Pass them to <Table> component

  <Table head={head} body={body} foot={foot} />

Extra fields

will be updated

Author

šŸ‘¤ Truong Nguyen

šŸ“ License

Copyright Ā© 2021 Truong Nguyen. This project is MIT licensed.


This README was generated with ā¤ļø by readme-md-generator

1.0.32

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.19

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.10

3 years ago

1.0.20

3 years ago

1.0.26

3 years ago

1.0.15

3 years ago

1.0.25

3 years ago

1.0.14

3 years ago

1.0.24

3 years ago

1.0.13

3 years ago

1.0.23

3 years ago

1.0.12

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago