@primer/react
Version:
An implementation of GitHub's Primer Design System using React
68 lines (65 loc) • 1.4 kB
JavaScript
import { c } from 'react-compiler-runtime';
import classes from './_TokenTextContainer.module.css.js';
import { clsx } from 'clsx';
import { jsx } from 'react/jsx-runtime';
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 === undefined ? "span" : t1;
let t2;
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
t2 = clsx(classes.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: children
});
$[8] = Component;
$[9] = children;
$[10] = t3;
$[11] = t4;
$[12] = t5;
} else {
t5 = $[12];
}
return t5;
};
export { TokenTextContainer as default };