UNPKG

grommet

Version:

focus on the essential experience

42 lines (39 loc) 1.11 kB
import React from 'react'; import { storiesOf } from '@storybook/react'; import { Grommet, Box, DataTable } from 'grommet'; import { grommet } from 'grommet/themes'; // Source code for the data can be found here // https://github.com/grommet/grommet/blob/master/src/js/components/DataTable/stories/data.js import { columns, DATA } from './data'; var StyledDataTable = function StyledDataTable() { return /*#__PURE__*/React.createElement(Grommet, { theme: grommet }, /*#__PURE__*/React.createElement(Box, { align: "center", pad: "large" }, /*#__PURE__*/React.createElement(DataTable, { columns: columns, data: DATA, step: 10, pad: { horizontal: 'large', vertical: 'medium' }, background: { header: 'dark-3', body: ['light-1', 'light-3'], footer: 'dark-3' }, border: { body: 'bottom' }, rowProps: { Eric: { background: 'accent-2', pad: 'large' } } }))); }; storiesOf('DataTable', module).add('Styled', function () { return /*#__PURE__*/React.createElement(StyledDataTable, null); });