import { IconProps } from '../icon/Icon'; import { ButtonHTMLAttributes } from 'react'; export interface ButtonIcon extends Pick { /** Position of the icon in relation to the text. */ position: 'left' | 'right'; } export interface ButtonPrimary { /** If true, gives destructive appearance */ feDestructive?: boolean; /** If true, hides text & icon and shows loading indicator. **Notice!** Only applicable if `feType` is `primary`. */ feLoading?: boolean; /** If provided, alters the appearance */ feType?: 'primary'; } export interface ButtonSecondary { /** If provided, alters the appearance */ feType?: 'secondary'; } interface BaseProps extends ButtonHTMLAttributes { /** Contents of the button */ children: string; /** If provided, renders an icon before or after the text. */ feIcon?: ButtonIcon; /** If provided, displays an alternative size */ feSize?: 'md' | 'sm'; } export type ButtonProps = BaseProps & (ButtonPrimary | ButtonSecondary); /** * Our `