UNPKG

shelving

Version:

Toolkit for using data in JavaScript.

13 lines (12 loc) 842 B
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 PARAGRAPH_CSS from "./Paragraph.module.css"; /** Resolved `.paragraph` class — for components (e.g. `Message`) that paint paragraph-shaped text without rendering a `<Paragraph>`. */ export const PARAGRAPH_CLASS = getModuleClass(PARAGRAPH_CSS, "paragraph"); export function Paragraph({ children, ...variants }) { return (_jsx("p", { className: getClass(PARAGRAPH_CLASS, getColorClass(variants), getAlignClass(variants), getSpacingClass(variants), getTypographyClass(variants)), children: children })); }