import * as React from 'react'; import { IconProps } from 'react-magma-icons'; import { ThemeInterface } from '../../theme/magma'; import { XOR } from '../../utils'; export declare enum AIButtonVariant { variantA = "variantA", variantB = "variantB" } export declare enum AIButtonShape { fill = "fill", leftCap = "leftCap", rightCap = "rightCap", round = "round" } export declare enum AIButtonSize { large = "large", medium = "medium", small = "small" } export declare enum AIButtonTextTransform { uppercase = "uppercase", none = "none" } export declare enum AIButtonType { button = "button", submit = "submit", reset = "reset" } export interface BaseAIButtonProps extends React.ButtonHTMLAttributes { /** * Set the button to display full-width. * @default false */ isFullWidth?: boolean; isInverse?: boolean; /** * Defines the border radius * @default AIButtonShape.fill */ shape?: AIButtonShape; /** * Set the button to a loading state * @default false */ isLoading?: boolean; /** * The relative size of the button * @default AIButtonSize.medium */ size?: AIButtonSize; /** * Determines whether the button appears in all-caps * @default AIButtonTextTransform.uppercase */ textTransform?: AIButtonTextTransform; /** * The variant of the button * @default AIButtonVariant.variantA */ variant?: AIButtonVariant; /** * @internal */ testId?: string; /** * @internal */ theme?: ThemeInterface; /** * The type attribute of the button * @default AIButtonType.button */ type?: AIButtonType; /** * Sets the color for the left side of the button gradient. */ leftColor?: string; /** * Sets the color for the right side of the button gradient. */ rightColor?: string; /** * Sets the color when the button is hovered. */ hoverColor?: string; /** * Sets the color when the button is pressed (active). */ pressedColor?: string; /** * Enables gradient animation for the button background. * @default false */ isAnimated?: boolean; } export interface TextAIButtonProps extends BaseAIButtonProps { /** * The content of the component */ children: React.ReactChild | React.ReactChild[]; /** * Icon to display on the right side within the component */ trailingIcon?: React.ReactElement; /** * Leading icon to display on the left side within the component */ leadingIcon?: boolean | React.ReactElement; } export interface IconOnlyAIButtonProps extends BaseAIButtonProps { /** * Icon to display on the right side within the component */ leadingIcon?: true | React.ReactElement; /** * The text the screen reader will announce. Required for icon-only buttons */ 'aria-label': string; children?: never; } export declare type AIButtonProps = XOR; export declare const AIButton: React.ForwardRefExoticComponent<({ trailingIcon?: never; } & IconOnlyAIButtonProps & React.RefAttributes) | ({} & TextAIButtonProps & React.RefAttributes)>;