import type { ComponentChildren } from 'preact';
import './Button.css';

interface ButtonProps extends preact.JSX.HTMLAttributes<HTMLButtonElement> {
  children: ComponentChildren;
  variant?: 'primary' | 'secondary';
  className?: string;
  onClick?: (e?: any) => any;
  disabled?: boolean;
  style?: any;
}

export function Button({ children, variant = 'primary', className = '', ...props }: ButtonProps) {
  return (
    <button 
      className={`btn btn-${variant} ${className}`}
      {...props}
    >
      {children}
    </button>
  );
}
