UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

80 lines (77 loc) 1.52 kB
import { c } from 'react-compiler-runtime'; import React from 'react'; import { clsx } from 'clsx'; import classes from './SkeletonBox.module.css.js'; import '@styled-system/css'; import merge from 'deepmerge'; import { jsx } from 'react/jsx-runtime'; const SkeletonBox = /*#__PURE__*/React.forwardRef(function SkeletonBox(t0, ref) { const $ = c(17); 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]; } const t3 = style; let t4; if ($[8] !== height || $[9] !== t3 || $[10] !== width) { t4 = merge(t3, { height, width }); $[8] = height; $[9] = t3; $[10] = width; $[11] = t4; } else { t4 = $[11]; } let t5; if ($[12] !== props || $[13] !== t1 || $[14] !== t2 || $[15] !== t4) { t5 = /*#__PURE__*/jsx("div", { ref: t1, className: t2, style: t4, ...props }); $[12] = props; $[13] = t1; $[14] = t2; $[15] = t4; $[16] = t5; } else { t5 = $[16]; } return t5; }); export { SkeletonBox };