import { type ComponentPropsWithRef, type ElementType } from 'react'; import type { ButtonSizesType, ButtonType, ChildrenProps, ClickEvents, ComponentButtonColorNamesType, EmotionColorNamesType, SizesDictionaryType, StyleProps } from './shared'; export type ButtonColor = ComponentButtonColorNamesType | EmotionColorNamesType; export type ButtonSize = keyof S extends never ? SizesDictionaryType : ButtonSizesType | S; export interface ButtonBaseProps extends ChildrenProps, StyleProps, ClickEvents { color?: ButtonColor; isDisabled?: boolean; isBlock?: boolean; isLoading?: boolean; isSymmetrical?: boolean; size?: ButtonSize; } export type ButtonProps = { elementType?: E; type?: ButtonType; } & ButtonBaseProps; export type ButtonLinkProps = { elementType?: E; } & ButtonBaseProps; export type SpiritButtonProps = ButtonProps & ComponentPropsWithRef; export type SpiritButtonLinkProps = ButtonLinkProps & ComponentPropsWithRef;