import React, { FC } from 'react'; import { PopoverProps } from '../popover'; import { FcrIconProps } from '../icon'; import { FcrIconType } from '../icon/type'; import './index.css'; export type ButtonSize = 'XL' | 'L' | 'M' | 'S' | 'XS' | 'XXS'; export type ButtonType = 'primary' | 'secondary' | 'secondary-bordered' | 'gray' | 'text' | 'text-brand' | 'link'; export type ButtonShape = 'circle' | 'rounded'; export type ButtonStyleType = 'danger' | 'white' | 'normal' | 'success'; export interface ButtonProps { /** * 按钮尺寸,可选值为 'XL' | 'L' | 'M' | 'S' | 'XS' | 'XXS',默认为'L' */ /** @en * Set the size of button, can be set to 'XL' | 'L' | 'M' | 'S' | 'XS' | 'XXS', default value is 'L'. */ size?: ButtonSize; /** * 按钮类型,可选值为 'primary' | 'secondary' | 'secondary-bordered' | 'gray' | 'text' | 'link',默认为'primary' */ /** @en * Set the type of button,can be set to 'primary' | 'secondary' | 'secondary-bordered' | 'gray' | 'text' | 'link', default value is 'primary'. */ type?: ButtonType; /** * 按钮形状,可选值为 'circle' | 'rounded',默认为'circle' */ /** @en * Set the shape of button,can be set to 'circle' | 'rounded', default value is 'circle'. */ shape?: ButtonShape; /** * 按钮样式类型,可选值为 'danger' | 'white' */ /** @en * Set the style type of button, can be set to 'danger' | 'white'. */ styleType?: ButtonStyleType; /** * 设置按钮前置图标 */ /** @en * Set the icon before the button text. */ preIcon?: FcrIconType; preIconProps?: Omit; /** * 设置按钮后置图标 */ /** @en * Set the icon after the button text. */ postIcon?: FcrIconType; postIconProps?: Omit; /** * 设置按钮加载状态 */ /** @en * Set the loading status of button. */ loading?: boolean; /** * 按钮禁用状态 */ /** @en * Disabled state of button. */ disabled?: boolean; /** * 点击按钮时的回调 */ /** @en * Set the handler to handle click event. */ onClick?: (e?: React.MouseEvent) => void; /** * 将按钮宽度调整为其父宽度的选项,默认为false */ /** @en * Option to fit button width to its parent width, default value is false. */ block?: boolean; extra?: Partial; className?: string; onHover?: (hover: boolean) => void; } export declare const FcrButton: FC>;