@amsterdam/design-system-react
Version:
All React components from the Amsterdam Design System. Use it to compose pages in your website or application.
25 lines (24 loc) • 1.06 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { clsx } from 'clsx';
import { forwardRef } from 'react';
import { TableBody } from './TableBody';
import { TableCaption } from './TableCaption';
import { TableCell } from './TableCell';
import { TableFooter } from './TableFooter';
import { TableHeader } from './TableHeader';
import { TableHeaderCell } from './TableHeaderCell';
import { TableRow } from './TableRow';
const TableRoot = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("div", { className: "ams-table", children: _jsx("table", { ...restProps, className: clsx('ams-table__table', className), ref: ref, children: children }) })));
TableRoot.displayName = 'Table';
/**
* @see {@link https://designsystem.amsterdam/?path=/docs/components-containers-table--docs Table docs at Amsterdam Design System}
*/
export const Table = Object.assign(TableRoot, {
Body: TableBody,
Caption: TableCaption,
Cell: TableCell,
Footer: TableFooter,
Header: TableHeader,
HeaderCell: TableHeaderCell,
Row: TableRow,
});