UNPKG

@stratakit/bricks

Version:

Small, modular components for StrataKit

30 lines (29 loc) 922 B
import { jsx } from "react/jsx-runtime"; import { Button as AkButton } from "@ariakit/react/button"; import { forwardRef } from "@stratakit/foundations/secret-internals"; import cx from "classnames"; import { useGhostAlignment } from "./~utils.GhostAligner.js"; const Button = forwardRef((props, forwardedRef) => { const { variant = "solid", tone = "neutral", ...rest } = props; const ghostAlignment = useGhostAlignment(); return /* @__PURE__ */ jsx( AkButton, { accessibleWhenDisabled: true, ...rest, "data-kiwi-variant": variant, "data-kiwi-tone": tone, "data-kiwi-ghost-align": variant === "ghost" ? ghostAlignment : void 0, className: cx( "\u{1F95D}-button", { "\u{1F95D}-ghost-aligner": variant === "ghost" }, props.className ), ref: forwardedRef } ); }); var Button_default = Button; export { Button_default as default };