UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

42 lines (41 loc) 957 B
import { ButtonBase } from "./ButtonBase.js"; import { c } from "react-compiler-runtime"; import { jsx } from "react/jsx-runtime"; import { forwardRef } from "react"; //#region src/Button/LinkButton.tsx const LinkButton = /*#__PURE__*/ forwardRef((t0, forwardedRef) => { const $ = c(9); let children; let props; let t1; if ($[0] !== t0) { ({children, as: t1, ...props} = t0); $[0] = t0; $[1] = children; $[2] = props; $[3] = t1; } else { children = $[1]; props = $[2]; t1 = $[3]; } const Component = t1 === void 0 ? "a" : t1; let t2; if ($[4] !== Component || $[5] !== children || $[6] !== forwardedRef || $[7] !== props) { t2 = /*#__PURE__*/ jsx(ButtonBase, { as: Component, ref: forwardedRef, "data-component": "LinkButton", ...props, children }); $[4] = Component; $[5] = children; $[6] = forwardedRef; $[7] = props; $[8] = t2; } else t2 = $[8]; return t2; }); //#endregion export { LinkButton };