@primer/react
Version:
An implementation of GitHub's Primer Design System using React
70 lines (66 loc) • 1.5 kB
JavaScript
var reactCompilerRuntime = require('react-compiler-runtime');
var _VisuallyHidden_module = require('./_VisuallyHidden.module.css.js');
var clsx = require('clsx');
var BoxWithFallback = require('./internal/components/BoxWithFallback.js');
var jsxRuntime = require('react/jsx-runtime');
function VisuallyHidden(t0) {
const $ = reactCompilerRuntime.c(14);
let children;
let className;
let isVisible;
let rest;
let t1;
if ($[0] !== t0) {
({
isVisible,
children,
as: t1,
className,
...rest
} = t0);
$[0] = t0;
$[1] = children;
$[2] = className;
$[3] = isVisible;
$[4] = rest;
$[5] = t1;
} else {
children = $[1];
className = $[2];
isVisible = $[3];
rest = $[4];
t1 = $[5];
}
const as = t1 === undefined ? "span" : t1;
const t2 = !isVisible;
let t3;
if ($[6] !== className || $[7] !== t2) {
t3 = clsx.clsx(className, {
[_VisuallyHidden_module.InternalVisuallyHidden]: t2
});
$[6] = className;
$[7] = t2;
$[8] = t3;
} else {
t3 = $[8];
}
let t4;
if ($[9] !== as || $[10] !== children || $[11] !== rest || $[12] !== t3) {
t4 = /*#__PURE__*/jsxRuntime.jsx(BoxWithFallback.BoxWithFallback, {
as: as,
className: t3,
...rest,
children: children
});
$[9] = as;
$[10] = children;
$[11] = rest;
$[12] = t3;
$[13] = t4;
} else {
t4 = $[13];
}
return t4;
}
module.exports = VisuallyHidden;
;