UNPKG

@dndbuilder.com/react

Version:

Drag and drop builder for React

45 lines (44 loc) 1.63 kB
"use client"; import { jsx as s } from "react/jsx-runtime"; import i from "react"; import { Root as d } from "../../../../../node_modules/.pnpm/@radix-ui_react-slot@1.2.2_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-slot/dist/index.js"; import { cva as u } from "../../../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js"; import { classNames as f } from "../../../../../utils.js"; const l = u( "inline-flex items-center justify-center rounded text-xs transition-colors focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 font-medium", { variants: { variant: { default: "bg-gray-800 text-white hover:bg-gray-900 focus:bg-gray-900", outline: "border border-gray-200 hover:border-gray-400 focus:border-gray-600 text-gray-800", secondary: "bg-gray-100 text-gray-800 hover:bg-gray-300 focus:bg-gray-300", link: "text-gray-800 underline-offset-4 hover:underline" }, size: { default: "h-8 px-4 py-2", sm: "h-9 rounded-sm px-3", xs: "h-7 rounded-sm px-3", lg: "h-11 rounded-sm px-8 text-[14px]", icon: "h-10 w-10" } }, defaultVariants: { variant: "default", size: "default" } } ), m = i.forwardRef( ({ className: e, variant: t, size: r, asChild: o = !1, ...a }, n) => /* @__PURE__ */ s( o ? d : "button", { className: f(l({ variant: t, size: r, className: e })), ref: n, ...a } ) ); m.displayName = "Button"; export { m as Button }; //# sourceMappingURL=button.js.map