import styles from './Button.module.css'

interface Props {
  variant: 'primary' | 'danger' | 'ghost' | 'outline'
  children: React.ReactNode
  onClick?: () => void
  type?: 'button' | 'submit'
  disabled?: boolean
}

export function Button({ variant, children, onClick, type = 'button', disabled }: Props) {
  return (
    <button type={type} className={`${styles.btn} ${styles[variant]}`} onClick={onClick} disabled={disabled}>
      {children}
    </button>
  )
}
