@primer/react
Version:
An implementation of GitHub's Primer Design System using React
86 lines (83 loc) • 1.57 kB
JavaScript
import { c } from 'react-compiler-runtime';
import React from 'react';
import { clsx } from 'clsx';
import classes from './SkeletonBox.module.css.js';
import { jsx } from 'react/jsx-runtime';
const SkeletonBox = /*#__PURE__*/React.forwardRef(function SkeletonBox(t0, ref) {
const $ = c(19);
let className;
let height;
let props;
let style;
let width;
if ($[0] !== t0) {
({
height,
width,
className,
style,
...props
} = t0);
$[0] = t0;
$[1] = className;
$[2] = height;
$[3] = props;
$[4] = style;
$[5] = width;
} else {
className = $[1];
height = $[2];
props = $[3];
style = $[4];
width = $[5];
}
const t1 = ref;
let t2;
if ($[6] !== className) {
t2 = clsx(className, classes.SkeletonBox);
$[6] = className;
$[7] = t2;
} else {
t2 = $[7];
}
let t3;
if ($[8] !== style) {
t3 = style || {};
$[8] = style;
$[9] = t3;
} else {
t3 = $[9];
}
let t4;
if ($[10] !== height || $[11] !== t3 || $[12] !== width) {
t4 = {
height,
width,
...t3
};
$[10] = height;
$[11] = t3;
$[12] = width;
$[13] = t4;
} else {
t4 = $[13];
}
let t5;
if ($[14] !== props || $[15] !== t1 || $[16] !== t2 || $[17] !== t4) {
t5 = /*#__PURE__*/jsx("div", {
ref: t1,
className: t2,
style: t4,
...props
});
$[14] = props;
$[15] = t1;
$[16] = t2;
$[17] = t4;
$[18] = t5;
} else {
t5 = $[18];
}
return t5;
});
export { SkeletonBox };