@forbespro/lead-agent
Version:
Lead Chat Agent React Component
51 lines (50 loc) • 2.08 kB
JavaScript
import { jsx as u } from "react/jsx-runtime";
import * as t from "react";
import { Slot as c } from "@radix-ui/react-slot";
import { cva as b } from "./index27.js";
import { cn as g } from "./index12.js";
const m = b(
"fpl-inline-flex fpl-items-center fpl-justify-center fpl-gap-2 fpl-text-balance fpl-h-auto fpl-text-left fpl-whitespace-nowrap fpl-rounded-md fpl-text-sm fpl-font-medium fpl-ring-offset-background fpl-transition-colors focus-visible:fpl-outline-none focus-visible:fpl-ring-2 focus-visible:fpl-ring-ring focus-visible:fpl-ring-offset-2 disabled:fpl-pointer-events-none fpl-disabled:fpl-opacity-50 [&_svg]:fpl-pointer-events-none [&_svg]:fpl-size-4 [&_svg]:fpl-shrink-0",
{
variants: {
variant: {
default: "fpl-bg-primary fpl-text-primary-foreground fpl-hover:bg-primary/90",
destructive: "fpl-bg-destructive fpl-text-destructive-foreground fpl-hover:bg-destructive/90",
outline: "fpl-border fpl-border-input fpl-bg-background fpl-hover:bg-accent fpl-hover:text-accent-foreground",
secondary: "fpl-bg-secondary fpl-text-secondary-foreground fpl-hover:bg-secondary/80",
ghost: "fpl-hover:bg-accent fpl-hover:text-accent-foreground",
link: "fpl-text-primary fpl-underline-offset-4 fpl-hover:underline"
},
size: {
default: "fpl-h-10 fpl-px-4 fpl-py-2",
sm: "fpl-h-9 fpl-rounded-md fpl-px-3",
lg: "fpl-h-11 fpl-rounded-md fpl-px-8",
icon: "fpl-h-10 fpl-w-10"
}
},
defaultVariants: {
variant: "default",
size: "default"
}
}
), v = t.forwardRef(
({ className: f, variant: l, size: r, asChild: o = !1, id: p, type: n = "button", ...e }, i) => {
const s = o ? c : "button", a = t.useId(), d = p || `fpl-button-${a}`;
return /* @__PURE__ */ u(
s,
{
id: d,
type: n,
className: g(m({ variant: l, size: r, className: f })),
ref: i,
"aria-disabled": e.disabled,
...e
}
);
}
);
v.displayName = "Button";
export {
v as Button,
m as buttonVariants
};