import './Button.css'; import React from 'react'; import type { ReactNode, ElementType } from 'react'; import type { IconProps, IconSize } from '@ornament-ui/icons'; import type { FormElementSizeVariant } from '../../types/FormElementSizeVariant'; import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef'; import { BUTTON_DEFAULT_TAG } from './constants'; export declare const buttonVariant: readonly ["contained", "outlined", "ghost", "function"]; export declare const buttonColorVariant: readonly ["primary", "secondary"]; export declare const buttonIconIndentVariant: readonly ["medium", "small"]; export type ButtonVariant = (typeof buttonVariant)[number]; export type ButtonColorVariant = (typeof buttonColorVariant)[number]; export type ButtonIconIndentVariant = (typeof buttonIconIndentVariant)[number]; export type ButtonIconComponent = React.FC; type ButtonBaseProps = { /** * Вариант отображения кнопки * @default contained * */ variant?: ButtonVariant; /** * Размер * @default m * */ size?: FormElementSizeVariant; /** * Цвет * @default primary * */ color?: ButtonColorVariant; /** * Размер отступа от иконки до контента * @default medium * */ iconIndent?: ButtonIconIndentVariant; /** Содержимое кнопки */ children?: ReactNode; /** Если {true} делает кнопку заблокированной */ disabled?: boolean; /** Если {true} переводит кнопку в состояние загрузки */ loading?: boolean; /** Дополнительные CSS-классы */ className?: string; /** Иконка слева */ iconLeft?: ButtonIconComponent; /** Иконка справа */ iconRight?: ButtonIconComponent; /** Если {true} растягивает кнопку на всю ширину родительского контейнера */ fullWidth?: boolean; }; export type ButtonProps = PolymorphicComponentPropsWithoutRef; export declare const cnButton: import("@bem-react/classname").ClassNameFormatter; export declare const Button: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef; export {};