shelving
Version:
Toolkit for using data in JavaScript.
16 lines (15 loc) • 835 B
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 { getTypographyClass } from "../style/Typography.js";
import { getClass, getModuleClass } from "../util/css.js";
import styles from "./Subheading.module.css";
/**
* Subsection heading — renders an `<h3>`.
* - Only marginally larger than body text; its bold weight is the main differentiator.
*/
export function Subheading({ level = "3", children, ...variants }) {
const Element = `h${level}`;
return (_jsx(Element, { className: getClass(getModuleClass(styles, "subheading"), getColorClass(variants), getAlignClass(variants), getSpacingClass(variants), getTypographyClass(variants)), children: children }));
}