shelving
Version:
Toolkit for using data in JavaScript.
17 lines (16 loc) • 1 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { getAlignClass } from "../style/Align.js";
import { getColorClass } from "../style/Color.js";
import { getSpacingClass } from "../style/Spacing.js";
import { getThicknessClass } from "../style/Thickness.js";
import { getTypographyClass } from "../style/Typography.js";
import { getClass, getModuleClass } from "../util/css.js";
import styles from "./Table.module.css";
/**
* Table block — rendered as `<table>`.
* - Wrap in a `<Figure scrollable>` (or any `scrollable` block) if the table may exceed the container width on small screens.
* - Thickness variants apply to the `<th>` / `<td>` borders (the `<table>` element itself has no border).
*/
export function Table({ children, ...variants }) {
return (_jsx("table", { className: getClass(getModuleClass(styles, "table"), getColorClass(variants), getAlignClass(variants), getSpacingClass(variants), getThicknessClass(variants), getTypographyClass(variants)), children: children }));
}