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

interface SpinnerProps {
  size?: 'sm' | 'md' | 'lg'
  className?: string
}

const sizes = { sm: 16, md: 24, lg: 32 }

export function Spinner({ size = 'md', className }: SpinnerProps) {
  const px = sizes[size]
  return (
    <span
      className={`${styles.spinner} ${className ?? ''}`}
      style={{ width: px, height: px }}
      role="status"
      aria-label="Loading"
    />
  )
}
