UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

29 lines (24 loc) 968 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const jsxRuntime = require('react/jsx-runtime'); const primitives = require('./primitives.cjs'); const show = require('../show/show.cjs'); function TableRootEl(props) { const { sticky, caption, ...rootProps } = props; return /* @__PURE__ */ jsxRuntime.jsx(primitives.TableRoot, { ...rootProps, "data-sticky": sticky ?? false, children: /* @__PURE__ */ jsxRuntime.jsxs(primitives.TableEl, { children: [ /* @__PURE__ */ jsxRuntime.jsx(show.Show, { when: caption, children: /* @__PURE__ */ jsxRuntime.jsx(primitives.Caption, { children: caption }) }), rootProps.children ] }) }); } const Table = { Root: TableRootEl, Caption: primitives.Caption, Header: primitives.Thead, HeaderCol: primitives.Th, Body: primitives.Tbody, Row: primitives.Tr, Cell: primitives.Td, Footer: primitives.Tfoot, Trigger: primitives.TableTrigger }; exports.Table = Table;