import { ReactNode } from 'react' import clsx from 'clsx' export type SizeType = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' export type ColorType = | 'green' | 'red' | 'blue' | 'indigo' | 'yellow' | 'gray' | 'gradient' | 'gray-white' export function Button(props: { className?: string onClick?: () => void children?: ReactNode size?: SizeType color?: ColorType type?: 'button' | 'reset' | 'submit' disabled?: boolean }) { const { children, className, onClick, size = 'md', color = 'indigo', type = 'button', disabled = false, } = props const sizeClasses = { '2xs': 'px-2 py-1 text-xs', xs: 'px-2.5 py-1.5 text-sm', sm: 'px-3 py-2 text-sm', md: 'px-4 py-2 text-sm', lg: 'px-4 py-2 text-base', xl: 'px-6 py-3 text-base', '2xl': 'px-6 py-3 text-xl', }[size] return ( ) }