@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
67 lines • 1.41 kB
JavaScript
import { c as _c } from "react-compiler-runtime";
import { forwardRef } from "react";
import classNames from "classnames";
import Icon from "../Icon/Icon.js";
import { jsx as _jsx } from "react/jsx-runtime";
const AccordionAction = /*#__PURE__*/forwardRef((t0, ref) => {
const $ = _c(13);
let className;
let icon;
let props;
if ($[0] !== t0) {
({
className,
icon,
...props
} = t0);
$[0] = t0;
$[1] = className;
$[2] = icon;
$[3] = props;
} else {
className = $[1];
icon = $[2];
props = $[3];
}
let t1;
if ($[4] !== className) {
t1 = classNames(className, "bf-accordion-action");
$[4] = className;
$[5] = t1;
} else {
t1 = $[5];
}
let t2;
if ($[6] !== icon) {
t2 = /*#__PURE__*/_jsx("span", {
className: "bf-accordion-action-circle",
children: /*#__PURE__*/_jsx(Icon, {
icon: icon
})
});
$[6] = icon;
$[7] = t2;
} else {
t2 = $[7];
}
let t3;
if ($[8] !== props || $[9] !== ref || $[10] !== t1 || $[11] !== t2) {
t3 = /*#__PURE__*/_jsx("button", {
className: t1,
ref: ref,
type: "button",
...props,
children: t2
});
$[8] = props;
$[9] = ref;
$[10] = t1;
$[11] = t2;
$[12] = t3;
} else {
t3 = $[12];
}
return t3;
});
AccordionAction.displayName = "Accordion.Action";
export default AccordionAction;