import { ControlTypeAccent, ControlTypeNegative, ControlTypePositive, PriorityPrimary, PrioritySecondary, PriorityTertiary, SizeExtraSmall, SizeSmall, SizeMedium, SizeLarge } from '../common'; import { ButtonReferenceType } from './Button.types'; /** @deprecated */ type DeprecatedTypes = 'primary' | 'pay' | 'secondary' | 'danger' | 'link'; /** @deprecated */ type DeprecatedSizes = SizeExtraSmall; /** * @deprecated Use new button instead of these APIs. * @example * ``` * import { Button, ButtonProps } from '@transferwise/components'; * * * ``` */ export type CommonProps = { v2?: false; /** Makes the button take up the full width of its container */ block?: boolean; /** * The `target` attribute for HTML anchor. * If set to `_blank`, `rel="noopener noreferrer"` is automatically added to the rendered node. */ target?: string; /** * Toggles the disabled state * @default false */ disabled?: boolean; /** * Toggles the loading state * @default false */ loading?: boolean; type?: ControlTypeAccent | ControlTypeNegative | ControlTypePositive | DeprecatedTypes | null; priority?: PriorityPrimary | PrioritySecondary | PriorityTertiary | null; size?: SizeSmall | SizeMedium | SizeLarge | DeprecatedSizes; htmlType?: 'submit' | 'reset' | 'button'; }; /** * @deprecated Use new button instead of APIs. * @example * ``` * import { Button, ButtonProps } from '@transferwise/components'; * * * ``` */ export type ButtonProps = CommonProps & Omit, 'type'> & { as?: 'button'; }; type AnchorProps = CommonProps & Omit, 'type'> & { as?: 'a'; }; /** * @deprecated Use new button instead of APIs. * @example * ``` * import { Button, ButtonProps } from '@transferwise/components'; * * * ``` */ export type LegacyButtonProps = ButtonProps | AnchorProps; /** * @deprecated Use new Button component via `