import React from 'react'; type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'success' | 'outline'; type ButtonSize = 'sm' | 'md' | 'lg'; interface ComponentNameProps { children: React.ReactNode; onClick?: () => void; variant?: ButtonVariant; size?: ButtonSize; disabled?: boolean; loading?: boolean; type?: 'button' | 'submit' | 'reset'; className?: string; fullWidth?: boolean; } /** * ComponentName - A versatile button component with multiple variants * * @param props - Component props * @returns JSX.Element */ export const ComponentName: React.FC = ({ children, onClick, variant = 'primary', size = 'md', disabled = false, loading = false, type = 'button', className = '', fullWidth = false }) => { const baseStyles = 'font-medium rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed'; const variantStyles = { primary: 'bg-blue-500 text-white hover:bg-blue-600 focus:ring-blue-500', secondary: 'bg-gray-500 text-white hover:bg-gray-600 focus:ring-gray-500', danger: 'bg-red-500 text-white hover:bg-red-600 focus:ring-red-500', success: 'bg-green-500 text-white hover:bg-green-600 focus:ring-green-500', outline: 'border-2 border-gray-300 text-gray-700 hover:bg-gray-50 focus:ring-gray-500', }; const sizeStyles = { sm: 'px-3 py-1.5 text-sm', md: 'px-4 py-2 text-base', lg: 'px-6 py-3 text-lg', }; const widthStyles = fullWidth ? 'w-full' : ''; const combinedClassName = `${baseStyles} ${variantStyles[variant]} ${sizeStyles[size]} ${widthStyles} ${className}`; return ( ); }; export default ComponentName;