UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

85 lines 1.83 kB
import { c as _c } from "react-compiler-runtime"; import { forwardRef } from "react"; import classNames from "classnames"; import BoxArrow from "../Box/Box.Arrow.js"; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; const SectionHeader = /*#__PURE__*/forwardRef((t0, ref) => { const $ = _c(19); let children; let className; let props; let t1; let t2; if ($[0] !== t0) { ({ children, className, arrow: t1, noPadding: t2, ...props } = t0); $[0] = t0; $[1] = children; $[2] = className; $[3] = props; $[4] = t1; $[5] = t2; } else { children = $[1]; className = $[2]; props = $[3]; t1 = $[4]; t2 = $[5]; } const arrow = t1 === undefined ? false : t1; const noPadding = t2 === undefined ? false : t2; let t3; if ($[6] !== className || $[7] !== noPadding) { t3 = classNames("bf-section-header", className, { "bf-no-padding": noPadding }); $[6] = className; $[7] = noPadding; $[8] = t3; } else { t3 = $[8]; } let t4; if ($[9] !== children) { t4 = /*#__PURE__*/_jsx("div", { children: children }); $[9] = children; $[10] = t4; } else { t4 = $[10]; } let t5; if ($[11] !== arrow) { t5 = arrow && /*#__PURE__*/_jsx(BoxArrow, {}); $[11] = arrow; $[12] = t5; } else { t5 = $[12]; } let t6; if ($[13] !== props || $[14] !== ref || $[15] !== t3 || $[16] !== t4 || $[17] !== t5) { t6 = /*#__PURE__*/_jsxs("div", { ...props, className: t3, ref: ref, children: [t4, t5] }); $[13] = props; $[14] = ref; $[15] = t3; $[16] = t4; $[17] = t5; $[18] = t6; } else { t6 = $[18]; } return t6; }); SectionHeader.displayName = "Section.Header"; export default SectionHeader;