UNPKG

mr-component

Version:
41 lines (40 loc) 1.28 kB
import * as React from 'react'; export type MrVariant = 'payment-primary' | 'payment-secondary' | 'success-action'; export interface MrButtonProps { /** 原生 Button 类型,保持向后兼容 */ type?: 'default' | 'primary' | 'success' | 'warning' | 'danger'; /** Mr 变体类型 */ variant?: MrVariant; /** 按钮文字 */ text?: string; /** 字体大小类型 */ fontSize?: 'h4' | 'h5' | 'h6' | 'h7'; /** 是否为金额相关按钮,会应用特殊样式 */ isAmount?: boolean; /** 尺寸 */ size?: 'large' | 'normal' | 'small' | 'mini'; /** 颜色 */ color?: string; /** 禁用状态 */ disabled?: boolean; /** 加载状态 */ loading?: boolean; /** 圆形按钮 */ round?: boolean; /** 方形按钮 */ square?: boolean; /** 块级元素 */ block?: boolean; /** 图标 */ icon?: React.ReactNode; /** 图标位置 */ iconPosition?: 'left' | 'right'; /** 点击事件 */ onClick?: () => void; /** 自定义类名 */ className?: string; /** 自定义样式 */ style?: React.CSSProperties; } declare const RefMrButton: React.ForwardRefExoticComponent<MrButtonProps & React.RefAttributes<HTMLButtonElement>>; export default RefMrButton;