@cerberus-design/react
Version:
The Cerberus Design React component library.
43 lines (40 loc) • 974 B
JavaScript
'use client';
import { jsx } from 'react/jsx-runtime';
import { cx, css } from 'styled-system/css';
import { Button } from '../button/button.js';
import { ark } from '../../node_modules/.pnpm/@ark-ui_react@5.29.1_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/@ark-ui/react/dist/components/factory.js';
import { button } from 'styled-system/recipes';
function TriggerItem(props) {
const { asChild, children, ...buttonProps } = props;
if (asChild) {
return /* @__PURE__ */ jsx(
ark.div,
{
className: cx(
button({
shape: "rounded",
usage: "ghost"
}),
css({
w: "1/2"
})
),
asChild: true,
children
}
);
}
return /* @__PURE__ */ jsx(
Button,
{
...buttonProps,
className: css({
w: "1/2"
}),
shape: "rounded",
usage: "outlined",
children
}
);
}
export { TriggerItem };