UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

86 lines (83 loc) 1.75 kB
import { c } from 'react-compiler-runtime'; import { clsx } from 'clsx'; import classes from './Header.module.css.js'; import { jsxs, jsx } from 'react/jsx-runtime'; /** * Displays the name and description of a `Group`. */ function Header(t0) { const $ = c(16); let auxiliaryText; let className; let props; let t1; let title; if ($[0] !== t0) { const { variant: t2, title: t3, auxiliaryText: t4, children: _children, className: t5, ...t6 } = t0; t1 = t2; title = t3; auxiliaryText = t4; className = t5; props = t6; $[0] = t0; $[1] = auxiliaryText; $[2] = className; $[3] = props; $[4] = t1; $[5] = title; } else { auxiliaryText = $[1]; className = $[2]; props = $[3]; t1 = $[4]; title = $[5]; } const variant = t1 === undefined ? "subtle" : t1; let t2; if ($[6] !== className) { t2 = clsx(className, classes.Header); $[6] = className; $[7] = t2; } else { t2 = $[7]; } const t3 = variant === "filled" ? "" : undefined; let t4; if ($[8] !== auxiliaryText) { t4 = auxiliaryText && /*#__PURE__*/jsx("span", { children: auxiliaryText }); $[8] = auxiliaryText; $[9] = t4; } else { t4 = $[9]; } let t5; if ($[10] !== props || $[11] !== t2 || $[12] !== t3 || $[13] !== t4 || $[14] !== title) { t5 = /*#__PURE__*/jsxs("div", { role: "heading", className: t2, "data-filled": t3, "data-component": "ActionList.Header", ...props, children: [title, t4] }); $[10] = props; $[11] = t2; $[12] = t3; $[13] = t4; $[14] = title; $[15] = t5; } else { t5 = $[15]; } return t5; } export { Header };