@cloudflare/builder-table

4.0.20 • Public • Published

@cloudflare/builder-table

Cloudflare Table Builder

Installation

Installation with yarn is recommended

$ yarn add @cloudflare/builder-table

Usage

import React from 'react';
import { TableBuilder } from '../../src';

const rows = [{ name: 'James', coolness: 1 }, { name: 'David', coolness: -1 }];

const columns = [
  {
    label: 'Name',
    cell: row => row.name
  },
  {
    label: 'Coolness',
    cell: row => row.coolness,
    columnHover: true,
    align: 'left',
    sortProps: {
      active: true,
      direction: 'desc'
    }
  }
];

class BuilderTable extends React.Component {
  render() {
    return (
      <div>
        <TableBuilder rowHover={true} rows={rows} columns={columns} />
      </div>
    );
  }
}

BuilderTable.displayName = 'BuilderTable';

export default BuilderTable;

Readme

Keywords

none

Package Sidebar

Install

npm i @cloudflare/builder-table

Weekly Downloads

1,167

Version

4.0.20

License

BSD-3-Clause

Unpacked Size

161 kB

Total Files

9

Last publish

Collaborators

  • lerwincf
  • lbarthonet
  • cf-media-manager
  • jacobbednarz
  • celso
  • cf-radar
  • dash_service_account
  • g4brym
  • snigdha34
  • wrangler-publisher
  • marksteyn
  • chiminator
  • sgoodhew_cf
  • terinjokes
  • third774
  • jsteinberger
  • jasnell
  • asapzacy
  • pcostanzo
  • gregbrimble
  • geelen
  • rexscaria
  • dcruz_cf
  • xuranwang
  • jculvey
  • sejoker
  • vasturiano
  • cf-ci-write
  • segments-write
  • thibmeu
  • xortive
  • gurjinder
  • cf-ci2
  • lvalenta
  • worenga