import React from 'react'; import './Button.scss'; /** 链接属性 */ export interface MtLinkDefaultProperty { href?: string; target?: string; rel?: string; } /** 按钮形状 */ type ButtonShape = 'circle' | 'round' | 'plain'; /** * 定义 MtButton 的 Props 类型 * 继承 button 和 a 元素的所有 HTML 属性 */ export type MtButtonProps = { /** 按钮的内容(优先)或文本 */ children?: React.ReactNode; /** 自定义类名(使用自定义类名时需自行处理所有样式) */ customClass?: string; /** 自定义按钮文本(当没有 children 时使用) */ buttonText?: string | React.ReactNode; /** 按钮形状: circle(圆形), round(圆角), plain(方形) */ shape?: ButtonShape; /** Link 按钮配置 */ link?: MtLinkDefaultProperty; /** 自定义data属性集合, key前缀不带data- */ customDataAttr?: Record; /** 字体大小,也可通过 style 设置 */ size?: string; } & Omit, 'size'> & Omit, 'size'>; declare const MtButton: React.FC; export default MtButton;