UNPKG

@baseplate-dev/ui-components

Version:

Shared UI component library

22 lines 912 B
import { jsx as _jsx } from "react/jsx-runtime"; import { Slot } from 'radix-ui'; import { buttonVariants } from '#src/styles/index.js'; import { cn } from '#src/utils/index.js'; /** * Displays a button or a component that looks like a button. * * - Added ghostDestructive variant * - Updated link variant to use primary color * - Added linkDestructive variant * - Added ability to set no size to the button * - Added ability to set justify to the button * - Default to type="button" if not provided * * https://ui.shadcn.com/docs/components/button */ function Button({ className, variant, size, justify, asChild = false, type = 'button', ...props }) { const Comp = asChild ? Slot.Root : 'button'; return (_jsx(Comp, { "data-slot": "button", className: cn(buttonVariants({ variant, size, justify, className })), type: type, ...props })); } export { Button }; //# sourceMappingURL=button.js.map