import { MouseEvent, FocusEvent, ReactElement, ReactChild } from 'react'; import { Intent, ThemeVariant } from './StyledButton'; import { IconName } from '../Icon'; import { CommonProps } from '../common'; export interface ButtonProps extends CommonProps { /** * Disable state of button. */ disabled?: boolean; /** * Icon name to render before the text. */ icon?: IconName; /** * Visual intent color to apply to button. It is required for `filled`, `outlined` and `text` variants. */ intent?: 'primary' | 'danger' | 'success' | 'warning' | 'error'; /** * Loading state of button. */ loading?: boolean; /** * Set handler to handler `blur` event. */ onBlur?: (e: FocusEvent) => void; /** * Set the handler to handle `click` event. */ onClick?: (e: MouseEvent) => void; /** * Icon name to render after the text. */ rightIcon?: IconName; /** * Size of button. */ size?: 'small' | 'medium' | 'large'; /** * Button label. */ text: ReactChild; /** * Specifies the HTML attribute type of button. */ type?: 'submit' | 'reset' | 'button'; /** * Button type. */ variant?: 'basic' | 'basic-transparent' | 'filled' | 'outlined' | 'text' | 'filled-reversed'; } export declare const getThemeVariant: (variant: 'basic' | 'basic-transparent' | 'filled' | 'outlined' | 'text' | 'filled-reversed', intent: Intent) => ThemeVariant; declare const Button: ({ text, icon, rightIcon, onClick, onBlur, variant, intent, loading, disabled, size, type, id, className, style, sx, "data-test-id": dataTestId, }: ButtonProps) => ReactElement; export default Button;