diff --git a/packages/store-ui/src/index.ts b/packages/store-ui/src/index.ts index b7214dfc39..d530aa434b 100644 --- a/packages/store-ui/src/index.ts +++ b/packages/store-ui/src/index.ts @@ -60,17 +60,35 @@ export type { IconButtonProps } from './molecules/IconButton' export { default as Modal } from './molecules/Modal' export type { ModalProps } from './molecules/Modal' -export { default as Accordion } from './molecules/Accordion' -export type { AccordionProps } from './molecules/Accordion' - -export { AccordionItem } from './molecules/Accordion' -export type { AccordionItemProps } from './molecules/Accordion' - -export { AccordionButton } from './molecules/Accordion' -export type { AccordionButtonProps } from './molecules/Accordion' - -export { AccordionPanel } from './molecules/Accordion' -export type { AccordionPanelProps } from './molecules/Accordion' +export { + default as Accordion, + AccordionItem, + AccordionButton, + AccordionPanel, +} from './molecules/Accordion' +export type { + AccordionProps, + AccordionItemProps, + AccordionButtonProps, + AccordionPanelProps, +} from './molecules/Accordion' + +export { + Table, + TableBody, + TableCell, + TableFooter, + TableHead, + TableRow, +} from './molecules/Table' +export type { + TableProps, + TableBodyProps, + TableCellProps, + TableFooterProps, + TableHeadProps, + TableRowProps, +} from './molecules/Table' // Hooks export { default as useSlider } from './hooks/useSlider' diff --git a/packages/store-ui/src/molecules/Table/Table.test.tsx b/packages/store-ui/src/molecules/Table/Table.test.tsx new file mode 100644 index 0000000000..f02adea1a7 --- /dev/null +++ b/packages/store-ui/src/molecules/Table/Table.test.tsx @@ -0,0 +1,237 @@ +import React from 'react' +import { render } from '@testing-library/react' +import { axe } from 'jest-axe' + +import Table from './Table' +import TableHead from './TableHead' +import TableRow from './TableRow' +import TableBody from './TableBody' +import TableCell from './TableCell' +import TableFooter from './TableFooter' + +describe('Table', () => { + describe('Data attributes', () => { + it('should render a simple table with all expected data-attributes', () => { + const { getByTestId, queryAllByTestId } = render( +
` or ` | ` tag, according to a `variant` prop that supports values `"header"` and `"data"`.
+
+## Props
+
+All table-related components support all attributes also supported by their respective HTML tags.
+
+Besides those attributes, the following props are also supported:
+
+### `Table` component
+
+ |
---|