import type { ReactElement, ReactNode } from 'react'; import type { StyleProp, ViewStyle } from 'react-native'; import type { IconName } from '../Icon'; import type { Intent, ThemeVariant } from './StyledButton'; /** * @deprecated Use 'primary' | 'secondary' | 'danger' | 'inverted' instead. */ type DeprecatedIntent = 'white'; type ValidIntent = 'primary' | 'secondary' | 'danger' | 'inverted'; export interface ButtonProps { /** * Helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label. */ accessibilityHint?: string; /** * A succinct label in a localized string that identifies the accessibility element */ accessibilityLabel?: string; /** * Disable state of button. */ disabled?: boolean; /** * Places an icon within the button, before the button's text */ icon?: IconName | ReactNode; /** * Visual intent color to apply to button. It is required for `filled`, `outlined` and `text` variants. * * ⚠️ 'white' intent is deprecated and will be removed in the next major release. Please use 'primary' | 'secondary' | 'danger' | 'inverted' instead. */ intent?: ValidIntent | DeprecatedIntent; /** * Loading state of button. */ loading?: boolean; /** * Set the handler to handle press event. */ onPress: () => void; /** * Places an icon within the button, after the button's text */ rightIcon?: IconName | ReactNode; /** * Additional style. */ style?: StyleProp; /** * Testing id of the component. */ testID?: string; /** * Button label. */ text?: ReactNode; /** * Button type. */ variant?: 'filled' | 'outlined' | 'text' | 'inline-text' | 'filled-medium' | 'outlined-medium' | 'text-medium' | 'filled-compact' | 'outlined-compact' | 'text-compact' | 'inline-text-compact'; } export declare const getThemeVariant: (variant: "filled" | "outlined" | "text" | "filled-medium" | "outlined-medium" | "text-medium" | "filled-compact" | "outlined-compact" | "text-compact", intent: Intent) => ThemeVariant; declare const Button: ({ accessibilityHint, accessibilityLabel, disabled, icon, intent, loading, onPress, rightIcon, style, testID, text, variant, }: ButtonProps) => ReactElement; export default Button;