import { Story, Preview, ArgsTable } from '@storybook/addon-docs/blocks';
import { Table } from './Table';

# Table

Tables are used to display tabular data to the user. Tables are to be used when there's a lot of structured data to display to the user
where the user may want to sort, filter or in other ways manipulate the displayed data.

<Preview>
  <Story id="surfaces-table--default" />
</Preview>

### Subcomponents

The Table has all of its internal components exported. You can use them if you want to build the table yourself but
keep the same styling as the current table.

These are under the `Table` namespace under the names `Table.Tr`, `Table.Td` and `Table.Th`

## React table

The table uses the `react-table` package under the hood. That means that you can supply most of the [available options](https://react-table.tanstack.com/) in `react-table` in the `columns` prop.

## Props

<ArgsTable props={Table} />
