import type { ComponentProps, ReactNode } from 'react'; export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost'; export type ButtonSize = 'sm' | 'md' | 'lg'; export interface ButtonProps extends ComponentProps<'button'> { /** Visual weight. One `primary` per view region. */ variant?: ButtonVariant; /** Height 32 / 40 / 48px — the same scale as every form control. */ size?: ButtonSize; /** Shows a spinner, sets `aria-busy` and disables the button. */ loading?: boolean; /** Stretch to the container's width. */ fullWidth?: boolean; /** Icon before the label (hidden from assistive tech). */ leftIcon?: ReactNode; /** Icon after the label (hidden from assistive tech). */ rightIcon?: ReactNode; /** Render the single child element (e.g. a link) with button styles instead of a `