UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

57 lines (56 loc) 1.37 kB
import _TokenTextContainer_module_css_default from "./_TokenTextContainer.module.css.js"; import { c } from "react-compiler-runtime"; import { clsx } from "clsx"; import { jsx } from "react/jsx-runtime"; //#region src/Token/_TokenTextContainer.tsx const TokenTextContainer = (t0) => { const $ = c(13); let children; let id; let props; let t1; if ($[0] !== t0) { ({children, id, as: t1, ...props} = t0); $[0] = t0; $[1] = children; $[2] = id; $[3] = props; $[4] = t1; } else { children = $[1]; id = $[2]; props = $[3]; t1 = $[4]; } const Component = t1 === void 0 ? "span" : t1; let t2; if ($[5] === Symbol.for("react.memo_cache_sentinel")) { t2 = clsx(_TokenTextContainer_module_css_default.TokenTextContainer); $[5] = t2; } else t2 = $[5]; let t3; if ($[6] !== id) { var _id; t3 = (_id = id) === null || _id === void 0 ? void 0 : _id.toString(); $[6] = id; $[7] = t3; } else t3 = $[7]; const t4 = Component === "button" ? props : Component === "a" ? props : props; let t5; if ($[8] !== Component || $[9] !== children || $[10] !== t3 || $[11] !== t4) { t5 = /*#__PURE__*/ jsx(Component, { className: t2, id: t3, ...t4, children }); $[8] = Component; $[9] = children; $[10] = t3; $[11] = t4; $[12] = t5; } else t5 = $[12]; return t5; }; //#endregion export { TokenTextContainer as default };