UNPKG

@amsterdam/design-system-react

Version:

All React components from the Amsterdam Design System. Use it to compose pages in your website or application.

26 lines (25 loc) 981 B
import { jsx as _jsx } from "react/jsx-runtime"; /** * @license EUPL-1.2+ * Copyright Gemeente Amsterdam */ 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'; export const Table = Object.assign(TableRoot, { Body: TableBody, Caption: TableCaption, Cell: TableCell, Footer: TableFooter, Header: TableHeader, HeaderCell: TableHeaderCell, Row: TableRow, });