@primer/react
Version:
An implementation of GitHub's Primer Design System using React
67 lines (64 loc) • 1.64 kB
JavaScript
import { c } from 'react-compiler-runtime';
import { forwardRef } from 'react';
import { IconButton } from '../Button/IconButton.js';
import { jsx } from 'react/jsx-runtime';
const GroupHeadingTrailingActionImpl = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
const $ = c(13);
let icon;
let label;
let props;
let t1;
let t2;
if ($[0] !== t0) {
({
as: t1,
icon,
label,
href: t2,
...props
} = t0);
$[0] = t0;
$[1] = icon;
$[2] = label;
$[3] = props;
$[4] = t1;
$[5] = t2;
} else {
icon = $[1];
label = $[2];
props = $[3];
t1 = $[4];
t2 = $[5];
}
const as = t1 === undefined ? "button" : t1;
const href = t2 === undefined ? null : t2;
let t3;
if ($[6] !== as || $[7] !== forwardedRef || $[8] !== href || $[9] !== icon || $[10] !== label || $[11] !== props) {
t3 = /*#__PURE__*/jsx(IconButton, {
as: as,
"aria-label": label,
icon: icon,
variant: "invisible",
size: "small",
tooltipDirection: "w",
href: href,
ref: forwardedRef,
"data-component": "ActionList.GroupHeading.TrailingAction",
...props
});
$[6] = as;
$[7] = forwardedRef;
$[8] = href;
$[9] = icon;
$[10] = label;
$[11] = props;
$[12] = t3;
} else {
t3 = $[12];
}
return t3;
});
GroupHeadingTrailingActionImpl.displayName = 'ActionList.GroupHeading.TrailingAction';
GroupHeadingTrailingActionImpl.__SLOT__ = Symbol('ActionList.GroupHeading.TrailingAction');
const GroupHeadingTrailingAction = GroupHeadingTrailingActionImpl;
export { GroupHeadingTrailingAction };