import React from 'react'; import { Column } from 'react-table'; import { withKnobs } from '@storybook/addon-knobs'; import { Title } from '../title/title.component'; import { Wrapper } from '../wrapper/wrapper.component'; import { getTableCells, getTableFooter, getTableHeader } from './data/table-data'; import { DataType, Table } from './table.component'; export default { title: 'GEENEE-UI/Table', component: Table, decorators: [ withKnobs ], parameters: { design: { type: 'figma', url: 'https://www.figma.com/file/GOLs0PKtnDsK3wyUUILuCj/01---Builder-UI?node-id=44%3A0' } } }; export function Playground() { const columns: Column[] = React.useMemo(() => [ { accessor: 'features', minWidth: 270, // width: 352, Header: getTableHeader(0), Cell: ({ cell: { value } }) => { value } }, { accessor: 'hobbyists', minWidth: 180, // width: 192, Header: getTableHeader(1), Footer: getTableFooter(0), Cell: ({ cell: { value } }) => { value } }, { accessor: 'premium', minWidth: 180, // width: 192, Header: getTableHeader(2), Footer: getTableFooter(1), Cell: ({ cell: { value } }) => { value } }, { accessor: 'teams', minWidth: 180, // width: 192, Header: getTableHeader(3), Footer: getTableFooter(2), Cell: ({ cell: { value } }) => { value } }, { accessor: 'enterprise', minWidth: 180, // width: 192, Header: getTableHeader(4), Footer: getTableFooter(3), Cell: ({ cell: { value } }) => { value } } ], []); const data = React.useMemo(() => getTableCells(), []); return (
Billing Options ); }