From 8bf898153a28078e57990e429a4fa807cb2227c2 Mon Sep 17 00:00:00 2001 From: Apple Date: Sat, 29 Nov 2025 05:19:20 -0800 Subject: [PATCH] fix: add missing Button UI component for daarion-web build --- apps/web/src/components/ui/button.tsx | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 apps/web/src/components/ui/button.tsx diff --git a/apps/web/src/components/ui/button.tsx b/apps/web/src/components/ui/button.tsx new file mode 100644 index 00000000..30ef2b3d --- /dev/null +++ b/apps/web/src/components/ui/button.tsx @@ -0,0 +1,48 @@ +'use client'; + +import * as React from 'react'; + +export interface ButtonProps extends React.ButtonHTMLAttributes { + variant?: 'default' | 'outline' | 'ghost' | 'link' | 'destructive'; + size?: 'default' | 'sm' | 'lg' | 'icon'; + asChild?: boolean; +} + +const Button = React.forwardRef( + ({ className = '', variant = 'default', size = 'default', children, disabled, ...props }, ref) => { + const baseStyles = 'inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50'; + + const variantStyles = { + default: 'bg-blue-600 text-white hover:bg-blue-700', + outline: 'border border-gray-600 bg-transparent hover:bg-gray-800 text-gray-200', + ghost: 'hover:bg-gray-800 text-gray-200', + link: 'text-blue-400 underline-offset-4 hover:underline', + destructive: 'bg-red-600 text-white hover:bg-red-700', + }; + + const sizeStyles = { + default: 'h-10 px-4 py-2 text-sm', + sm: 'h-8 px-3 text-xs', + lg: 'h-12 px-6 text-base', + icon: 'h-10 w-10', + }; + + const combinedClassName = `${baseStyles} ${variantStyles[variant]} ${sizeStyles[size]} ${className}`; + + return ( + + ); + } +); + +Button.displayName = 'Button'; + +export { Button }; +