import React from 'react'; import '../../styles/base.module.css'; import { AllElementPropsWithRef } from '../../utils/elementTypings'; export declare enum ButtonSize { Small = "small", Medium = "medium" } export interface ButtonTheme { '--background-color'?: string; '--background-color-focus'?: string; '--background-color-hover'?: string; '--background-color-active'?: string; '--background-color-disabled'?: string; '--border-color'?: string; '--border-color-focus'?: string; '--border-color-hover'?: string; '--border-color-active'?: string; '--border-color-disabled'?: string; '--color'?: string; '--color-focus'?: string; '--color-hover'?: string; '--color-active'?: string; '--color-disabled'?: string; '--outline-color-focus'?: string; [key: string]: string | undefined; } export declare enum ButtonPresetTheme { Bus = "bus", Coat = "coat", Black = "black" } export declare enum ButtonVariant { Primary = "primary", Secondary = "secondary", Supplementary = "supplementary", Success = "success", Danger = "danger", Clear = "clear" } type NonSupplementaryButtonProps = AllElementPropsWithRef<'button'> & { /** * The content (label) of the button */ children: string; /** * Additional class names to apply to the button */ className?: string; /** * Defines the button variant * @default ButtonVariant.Primary */ variant?: Exclude; /** * Defines the button theme * @default ButtonTheme.Bus */ theme?: ButtonPresetTheme | ButtonTheme; /** * If `true`, the button will take up the full width of its container */ fullWidth?: boolean; /** * Element placed on the left side of the button label */ iconStart?: React.ReactNode; /** * Element placed on the right side of the button label */ iconEnd?: React.ReactNode; /** * The size of the button * @default ButtonSize.Medium */ size?: ButtonSize; }; type NonVariantButtonProps = Omit; export type ButtonProps = (NonVariantButtonProps & { variant?: Exclude; }) | (NonVariantButtonProps & { variant: ButtonVariant.Supplementary | ButtonVariant; iconStart: React.ReactNode; }) | (NonVariantButtonProps & { variant: ButtonVariant.Supplementary | ButtonVariant; iconEnd: React.ReactNode; }); export declare const Button: ({ children, className, disabled, fullWidth, size, theme, variant, iconStart, iconEnd, onClick, ref, ...rest }: ButtonProps) => React.JSX.Element; export {};