UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

79 lines (76 loc) 1.63 kB
import { c } from 'react-compiler-runtime'; import { clsx } from 'clsx'; import React from 'react'; import { BoxWithFallback } from '../internal/components/BoxWithFallback.js'; import classes from './Flash.module.css.js'; import { jsx } from 'react/jsx-runtime'; const Flash = /*#__PURE__*/React.forwardRef(function Flash(t0, ref) { const $ = c(17); let as; let className; let full; let rest; let sx; let t1; if ($[0] !== t0) { ({ as, className, variant: t1, full, sx, ...rest } = t0); $[0] = t0; $[1] = as; $[2] = className; $[3] = full; $[4] = rest; $[5] = sx; $[6] = t1; } else { as = $[1]; className = $[2]; full = $[3]; rest = $[4]; sx = $[5]; t1 = $[6]; } const variant = t1 === undefined ? "default" : t1; let t2; if ($[7] !== className) { t2 = clsx(classes.Flash, className); $[7] = className; $[8] = t2; } else { t2 = $[8]; } const t3 = full ? "" : undefined; let t4; if ($[9] !== as || $[10] !== ref || $[11] !== rest || $[12] !== sx || $[13] !== t2 || $[14] !== t3 || $[15] !== variant) { t4 = /*#__PURE__*/jsx(BoxWithFallback, { ...rest, ref: ref, as: as, className: t2, "data-full": t3, "data-variant": variant, sx: sx }); $[9] = as; $[10] = ref; $[11] = rest; $[12] = sx; $[13] = t2; $[14] = t3; $[15] = variant; $[16] = t4; } else { t4 = $[16]; } return t4; }); if (process.env.NODE_ENV !== "production") { Flash.displayName = 'Flash'; } export { Flash as default };