@primer/react
Version:
An implementation of GitHub's Primer Design System using React
39 lines (38 loc) • 901 B
JavaScript
import { ButtonBase } from "./ButtonBase.js";
import { c } from "react-compiler-runtime";
import { jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
//#region src/Button/Button.tsx
const ButtonComponent = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
const $ = c(7);
let children;
let props;
if ($[0] !== t0) {
({children, ...props} = t0);
$[0] = t0;
$[1] = children;
$[2] = props;
} else {
children = $[1];
props = $[2];
}
let t1;
if ($[3] !== children || $[4] !== forwardedRef || $[5] !== props) {
t1 = /*#__PURE__*/ jsx(ButtonBase, {
ref: forwardedRef,
as: "button",
type: "button",
...props,
children
});
$[3] = children;
$[4] = forwardedRef;
$[5] = props;
$[6] = t1;
} else t1 = $[6];
return t1;
});
ButtonComponent.displayName = "Button";
ButtonComponent.__SLOT__ = Symbol("Button");
//#endregion
export { ButtonComponent };