2020-04-26 20:33:39 +00:00
|
|
|
// @flow
|
|
|
|
import * as React from 'react';
|
|
|
|
import { Table, TableBody, TableData, TableHead, TableHeader, TableRow } from './table';
|
|
|
|
|
2020-07-29 20:54:09 +00:00
|
|
|
export default { title: 'Tables | Table' };
|
2020-04-26 20:33:39 +00:00
|
|
|
|
|
|
|
export const _default = () => (
|
|
|
|
<Table>
|
|
|
|
<TableHead>
|
|
|
|
<TableRow>
|
|
|
|
<TableHeader>Col 1</TableHeader>
|
|
|
|
<TableHeader>Col 2</TableHeader>
|
|
|
|
<TableHeader>Col 3</TableHeader>
|
|
|
|
</TableRow>
|
|
|
|
</TableHead>
|
|
|
|
<TableBody>
|
|
|
|
{[1, 2, 3].map(i => (
|
|
|
|
<TableRow key={i}>
|
|
|
|
<TableData>Column 1</TableData>
|
|
|
|
<TableData>Column 2</TableData>
|
|
|
|
<TableData>Column 3</TableData>
|
|
|
|
</TableRow>
|
|
|
|
))}
|
|
|
|
</TableBody>
|
|
|
|
</Table>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const striped = () => (
|
|
|
|
<Table striped>
|
|
|
|
<TableHead>
|
|
|
|
<TableRow>
|
|
|
|
<TableHeader>Col 1</TableHeader>
|
|
|
|
<TableHeader>Col 2</TableHeader>
|
|
|
|
<TableHeader>Col 3</TableHeader>
|
|
|
|
</TableRow>
|
|
|
|
</TableHead>
|
|
|
|
<TableBody>
|
|
|
|
{[1, 2, 3].map(i => (
|
|
|
|
<TableRow key={i}>
|
|
|
|
<TableData>Column 1</TableData>
|
|
|
|
<TableData>Column 2</TableData>
|
|
|
|
<TableData>Column 3</TableData>
|
|
|
|
</TableRow>
|
|
|
|
))}
|
|
|
|
</TableBody>
|
|
|
|
</Table>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const stripedAndOutlined = () => (
|
|
|
|
<Table striped outlined>
|
|
|
|
<TableHead>
|
|
|
|
<TableRow>
|
|
|
|
<TableHeader>Col 1</TableHeader>
|
|
|
|
<TableHeader>Col 2</TableHeader>
|
|
|
|
<TableHeader>Col 3</TableHeader>
|
|
|
|
</TableRow>
|
|
|
|
</TableHead>
|
|
|
|
<TableBody>
|
|
|
|
{[1, 2, 3].map(i => (
|
|
|
|
<TableRow key={i}>
|
|
|
|
<TableData>Column 1</TableData>
|
|
|
|
<TableData>Column 2</TableData>
|
|
|
|
<TableData>Column 3</TableData>
|
|
|
|
</TableRow>
|
|
|
|
))}
|
|
|
|
</TableBody>
|
|
|
|
</Table>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const compactAndOutlined = () => (
|
|
|
|
<Table outlined compact>
|
|
|
|
<TableHead>
|
|
|
|
<TableRow>
|
|
|
|
<TableHeader>Col 1</TableHeader>
|
|
|
|
<TableHeader>Col 2</TableHeader>
|
|
|
|
<TableHeader>Col 3</TableHeader>
|
|
|
|
</TableRow>
|
|
|
|
</TableHead>
|
|
|
|
<TableBody>
|
|
|
|
{[1, 2, 3].map(i => (
|
|
|
|
<TableRow key={i}>
|
|
|
|
<TableData>Column 1</TableData>
|
|
|
|
<TableData>Column 2</TableData>
|
|
|
|
<TableData>Column 3</TableData>
|
|
|
|
</TableRow>
|
|
|
|
))}
|
|
|
|
</TableBody>
|
|
|
|
</Table>
|
|
|
|
);
|