UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

93 lines 4.84 kB
import { ButtonCssVariables, type ButtonGroup, ButtonStylesNames, ButtonVariant, 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<HTMLButtonElement>; } export declare const Button: (<C = "button">(props: import("@mantine/core").PolymorphicComponentProps<C, ButtonProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(ButtonProps & { component?: any; } & Omit<Omit<any, "ref">, "component" | keyof ButtonProps> & { ref?: any; renderRoot?: (props: any) => any; }) | (ButtonProps & { component: React.ElementType; renderRoot?: (props: Record<string, 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; }; }> & 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: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement; declare const ButtonSecondary: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement; declare const ButtonTertiary: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement; declare const ButtonQuaternary: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement; declare const ButtonDestructive: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement; declare const ButtonDestructiveSecondary: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement; declare const ButtonDestructiveTertiary: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement; declare const ButtonDestructiveQuaternary: <L = "button">(props: import("@mantine/core").PolymorphicComponentProps<L, ButtonProps>) => React.ReactElement; export {}; //# sourceMappingURL=Button.d.ts.map