@primer/react
Version:
An implementation of GitHub's Primer Design System using React
39 lines (38 loc) • 900 B
JavaScript
import { c } from "react-compiler-runtime";
import { jsx } from "react/jsx-runtime";
import React from "react";
//#region src/Octicon/Octicon.tsx
/**
* @deprecated Use the icon component directly from `@primer/octicons-react` instead
*/
/**
* @deprecated Use the icon component directly from `@primer/octicons-react` instead
*/
const Octicon = /*#__PURE__*/ React.forwardRef((props, ref) => {
const $ = c(7);
let IconComponent;
let rest;
if ($[0] !== props) {
({icon: IconComponent, ...rest} = props);
$[0] = props;
$[1] = IconComponent;
$[2] = rest;
} else {
IconComponent = $[1];
rest = $[2];
}
let t0;
if ($[3] !== IconComponent || $[4] !== ref || $[5] !== rest) {
t0 = /*#__PURE__*/ jsx(IconComponent, {
...rest,
ref
});
$[3] = IconComponent;
$[4] = ref;
$[5] = rest;
$[6] = t0;
} else t0 = $[6];
return t0;
});
//#endregion
export { Octicon as default };