0.4.28 • Published 10 days ago

@atlaskit/table v0.4.28

Weekly downloads
-
License
Apache-2.0
Repository
bitbucket
Last release
10 days ago

Table

WARNING!

This is an experimental package for exploration and validation of the foundations for the Atlassian Design System.

Description

A table is used to display and organise complex data.

Usage

import Table from '@atlaskit/table';

Detailed docs and example usage can be found here.

Render Prop

import '@atlaskit/css-reset';
import Table, { Row, Cell, TBody, THead, HeadCell } from '@atlaskit/table';

import { presidents } from './data';

type President = (typeof presidents)[number];

/**
 * Primary UI component for user interaction
 */
export const RenderProp = ({ isSelectable }) => {
  return (
    <Table isSelectable={isSelectable}>
      <THead>
        <HeadCell>Name</HeadCell>
        <HeadCell>Party</HeadCell>
        <HeadCell>Year</HeadCell>
      </THead>
      <TBody<President> rows={presidents}>
        {row => (
          <Row key={row.id} {...row}>
            <Cell>{row.nm}</Cell>
            <Cell>{row.pp}</Cell>
            <Cell>{row.tm}</Cell>
          </Row>
        )}
      </TBody>
    </Table>
  );
};

Composition

import '@atlaskit/css-reset';
import Table, { Row, Cell, TBody, THead, HeadCell } from '@atlaskit/table';

import { presidents } from './data';

/**
 * Primary UI component for user interaction
 */
export const CompositionExample = ({ isSelectable }) => {
  return (
    <Table isSelectable={isSelectable}>
      <THead>
        <HeadCell>Name</HeadCell>
        <HeadCell>Party</HeadCell>
        <HeadCell>Year</HeadCell>
      </THead>
      <TBody>
        {presidents.map(row => (
          <Row key={row.id}>
            <Cell>{row.nm}</Cell>
            <Cell>{row.pp}</Cell>
            <Cell>{row.tm}</Cell>
          </Row>
        ))}
      </TBody>
    </Table>
  );
};
0.4.28

10 days ago

0.4.27

2 months ago

0.4.26

2 months ago

0.4.25

2 months ago

0.4.24

2 months ago

0.4.23

2 months ago

0.4.22

2 months ago

0.4.21

2 months ago

0.4.20

3 months ago

0.4.19

3 months ago

0.4.18

5 months ago

0.4.17

6 months ago

0.4.15

6 months ago

0.4.16

6 months ago

0.4.9

10 months ago

0.4.10

10 months ago

0.4.13

10 months ago

0.4.14

9 months ago

0.4.11

10 months ago

0.4.12

10 months ago

0.4.8

10 months ago

0.4.5

11 months ago

0.4.4

11 months ago

0.4.7

11 months ago

0.4.6

11 months ago

0.4.3

11 months ago

0.3.0

1 year ago

0.4.1

12 months ago

0.3.2

1 year ago

0.4.0

12 months ago

0.3.1

1 year ago

0.3.4

1 year ago

0.4.2

12 months ago

0.3.3

1 year ago

0.2.7

1 year ago

0.2.8

1 year ago

0.2.6

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago