import { LucideIcon } from 'lucide-react'; import * as React from 'react'; import { IconType } from 'react-icons'; import { ImSpinner2 } from 'react-icons/im'; import { cn } from '@/lib/utils'; const ButtonVariant = ['primary', 'outline', 'ghost', 'light', 'dark'] as const; const ButtonSize = ['sm', 'base'] as const; type ButtonProps = { isLoading?: boolean; isDarkBg?: boolean; variant?: (typeof ButtonVariant)[number]; size?: (typeof ButtonSize)[number]; leftIcon?: IconType | LucideIcon; rightIcon?: IconType | LucideIcon; classNames?: { leftIcon?: string; rightIcon?: string; }; } & React.ComponentPropsWithRef<'button'>; const Button = React.forwardRef( ( { children, className, disabled: buttonDisabled, isLoading, variant = 'primary', size = 'base', isDarkBg = false, leftIcon: LeftIcon, rightIcon: RightIcon, classNames, ...rest }, ref ) => { const disabled = isLoading || buttonDisabled; return ( ); } ); export default Button;