UNPKG

welcome-ui

Version:

Customizable design system with react, typescript, tailwindcss and ariakit.

36 lines (35 loc) 1.29 kB
"use client"; import './Table.css'; import { jsx as e } from "react/jsx-runtime"; import { forwardRef as b } from "react"; import { c as h } from "./index-B6iGEm-i.js"; const p = "_root_msc2t_2", u = "_content_msc2t_8", y = "_withColumnDivider_msc2t_73", N = { root: p, content: u, withColumnDivider: y }, s = h(N), n = b( ({ children: t, className: a, withColumnDivider: o = !1, ...m }, T) => /* @__PURE__ */ e("div", { className: s("root", a), ref: T, ...m, children: /* @__PURE__ */ e("div", { className: s("content", o && "withColumnDivider"), children: /* @__PURE__ */ e("table", { children: t }) }) }) ); n.displayName = "Table"; const r = (t) => /* @__PURE__ */ e("tbody", { ...t }); r.displayName = "Table.Tbody"; const l = (t) => /* @__PURE__ */ e("th", { ...t }); l.displayName = "Table.Th"; const c = (t) => /* @__PURE__ */ e("thead", { ...t }); c.displayName = "Table.Thead"; const i = (t) => /* @__PURE__ */ e("td", { ...t }); i.displayName = "Table.Td"; const d = ({ className: t, onClick: a, ...o }) => /* @__PURE__ */ e("tr", { className: t, "data-clickable": !!a, onClick: a, ...o }); d.displayName = "Table.Tr"; const w = Object.assign(n, { Tbody: r, Td: i, Th: l, Thead: c, Tr: d }); export { w as Table, n as TableComponent, N as tableClasses };