import { ButtonCssVariables, type ButtonGroup, ButtonStylesNames, ButtonVariant, Factory, ButtonProps as MantineButtonProps } from '@mantine/core'; import { ClickHandler } from '../../hooks/useClickWithLoading.js'; import { ButtonWithDisabledTooltipProps } from './ButtonWithDisabledTooltip.js'; export interface ButtonProps extends MantineButtonProps, ButtonWithDisabledTooltipProps { /** * Handler executed on click. * Supports async handlers - the button will show a loading state while the promise resolves. */ onClick?: ClickHandler; } type ButtonOverloadFactory = Factory<{ props: ButtonProps; defaultRef: HTMLButtonElement; defaultComponent: 'button'; stylesNames: ButtonStylesNames; vars: ButtonCssVariables; variant: ButtonVariant; staticComponents: { Group: typeof ButtonGroup; Primary: typeof ButtonPrimary; Secondary: typeof ButtonSecondary; Tertiary: typeof ButtonTertiary; Quaternary: typeof ButtonQuaternary; DestructivePrimary: typeof ButtonDestructive; DestructiveSecondary: typeof ButtonDestructiveSecondary; DestructiveTertiary: typeof ButtonDestructiveTertiary; DestructiveQuaternary: typeof ButtonDestructiveQuaternary; }; }>; export declare const Button: ((props: import("@mantine/core").PolymorphicComponentProps) => React.ReactElement) & Omit) => any; }) | (ButtonProps & { component?: any; } & Omit & { ref?: any; renderRoot?: (props: any) => any; })>, never> & import("@mantine/core").ThemeExtend<{ props: ButtonProps; defaultRef: HTMLButtonElement; defaultComponent: 'button'; stylesNames: ButtonStylesNames; vars: ButtonCssVariables; variant: ButtonVariant; staticComponents: { Group: typeof ButtonGroup; Primary: typeof ButtonPrimary; Secondary: typeof ButtonSecondary; Tertiary: typeof ButtonTertiary; Quaternary: typeof ButtonQuaternary; DestructivePrimary: typeof ButtonDestructive; DestructiveSecondary: typeof ButtonDestructiveSecondary; DestructiveTertiary: typeof ButtonDestructiveTertiary; DestructiveQuaternary: typeof ButtonDestructiveQuaternary; }; }> & import("@mantine/core").ComponentClasses<{ props: ButtonProps; defaultRef: HTMLButtonElement; defaultComponent: 'button'; stylesNames: ButtonStylesNames; vars: ButtonCssVariables; variant: ButtonVariant; staticComponents: { Group: typeof ButtonGroup; Primary: typeof ButtonPrimary; Secondary: typeof ButtonSecondary; Tertiary: typeof ButtonTertiary; Quaternary: typeof ButtonQuaternary; DestructivePrimary: typeof ButtonDestructive; DestructiveSecondary: typeof ButtonDestructiveSecondary; DestructiveTertiary: typeof ButtonDestructiveTertiary; DestructiveQuaternary: typeof ButtonDestructiveQuaternary; }; }> & { varsResolver: import("@mantine/core").VarsResolver<{ props: ButtonProps; defaultRef: HTMLButtonElement; defaultComponent: 'button'; stylesNames: ButtonStylesNames; vars: ButtonCssVariables; variant: ButtonVariant; staticComponents: { Group: typeof ButtonGroup; Primary: typeof ButtonPrimary; Secondary: typeof ButtonSecondary; Tertiary: typeof ButtonTertiary; Quaternary: typeof ButtonQuaternary; DestructivePrimary: typeof ButtonDestructive; DestructiveSecondary: typeof ButtonDestructiveSecondary; DestructiveTertiary: typeof ButtonDestructiveTertiary; DestructiveQuaternary: typeof ButtonDestructiveQuaternary; }; }>; } & import("@mantine/core").PolymorphicComponentWithProps<{ props: ButtonProps; defaultRef: HTMLButtonElement; defaultComponent: 'button'; stylesNames: ButtonStylesNames; vars: ButtonCssVariables; variant: ButtonVariant; staticComponents: { Group: typeof ButtonGroup; Primary: typeof ButtonPrimary; Secondary: typeof ButtonSecondary; Tertiary: typeof ButtonTertiary; Quaternary: typeof ButtonQuaternary; DestructivePrimary: typeof ButtonDestructive; DestructiveSecondary: typeof ButtonDestructiveSecondary; DestructiveTertiary: typeof ButtonDestructiveTertiary; DestructiveQuaternary: typeof ButtonDestructiveQuaternary; }; }> & { Group: typeof ButtonGroup; Primary: typeof ButtonPrimary; Secondary: typeof ButtonSecondary; Tertiary: typeof ButtonTertiary; Quaternary: typeof ButtonQuaternary; DestructivePrimary: typeof ButtonDestructive; DestructiveSecondary: typeof ButtonDestructiveSecondary; DestructiveTertiary: typeof ButtonDestructiveTertiary; DestructiveQuaternary: typeof ButtonDestructiveQuaternary; }; declare const ButtonPrimary: (props: import("@mantine/core").PolymorphicComponentProps) => React.ReactElement; declare const ButtonSecondary: (props: import("@mantine/core").PolymorphicComponentProps) => React.ReactElement; declare const ButtonTertiary: (props: import("@mantine/core").PolymorphicComponentProps) => React.ReactElement; declare const ButtonQuaternary: (props: import("@mantine/core").PolymorphicComponentProps) => React.ReactElement; declare const ButtonDestructive: (props: import("@mantine/core").PolymorphicComponentProps) => React.ReactElement; declare const ButtonDestructiveSecondary: (props: import("@mantine/core").PolymorphicComponentProps) => React.ReactElement; declare const ButtonDestructiveTertiary: (props: import("@mantine/core").PolymorphicComponentProps) => React.ReactElement; declare const ButtonDestructiveQuaternary: (props: import("@mantine/core").PolymorphicComponentProps) => React.ReactElement; export declare namespace Button { type Props = ButtonProps; type StylesNames = ButtonStylesNames; type CssVariables = ButtonCssVariables; type Factory = ButtonOverloadFactory; namespace Primary { type Props = ButtonProps; } namespace Secondary { type Props = ButtonProps; } namespace Tertiary { type Props = ButtonProps; } namespace Quaternary { type Props = ButtonProps; } namespace DestructivePrimary { type Props = ButtonProps; } namespace DestructiveSecondary { type Props = ButtonProps; } namespace DestructiveTertiary { type Props = ButtonProps; } namespace DestructiveQuaternary { type Props = ButtonProps; } } export {}; //# sourceMappingURL=Button.d.ts.map