/// import * as React from "react"; export interface GroupProps extends React.HTMLAttributes { /** * 统一设置 Button 组件的按钮大小 */ size?: string; } export class Group extends React.Component {} interface HTMLAttributesWeak extends React.HTMLAttributes { onClick?: any; } export interface SplitProps extends HTMLAttributesWeak { /** * 样式品牌前缀 */ prefix?: string; /** * Dropdown 的对齐方式,参考 [Dropdown](http://gitlab.alibaba-inc.com/next/dropdown) */ align?: string; /** * Dropdown 的位置偏移,参考 [Dropdown](http://gitlab.alibaba-inc.com/next/dropdown) */ offset?: Array; /** * 类型,同 Button */ type?: "primary" | "secondary" | "normal" | "dark" | "light"; /** * 外观,同 Button */ shape?: "ghost" | "text" | "warning"; /** * 尺寸,同 Button */ size?: "small" | "medium" | "large"; /** * Dropdown 触发方式,参考 [Dropdown](http://gitlab.alibaba-inc.com/next/dropdown) */ trigger?: "click" | "hover"; /** * 弹层挂载的容器节点 */ container?: string | (() => void); /** * 弹层属性 */ popupProps?: {}; /** * 弹出的内容,参考 [Dropdown](http://gitlab.alibaba-inc.com/next/dropdown) */ menu?: React.ReactNode; /** * 点击按钮的回调 */ onClick?: (e: {}) => void; } export class Split extends React.Component {} interface HTMLAttributesWeak extends React.HTMLAttributes { onClick?: any; } export interface ButtonProps extends HTMLAttributesWeak { /** * 组件样式的品牌前缀 */ prefix?: string; /** * 按钮的类型 */ type?: "primary" | "secondary" | "normal" | "dark" | "light"; /** * 按钮的尺寸 */ size?: "small" | "medium" | "large"; /** * 按钮的形态 */ shape?: "ghost" | "text" | "warning"; /** * 设置 `button` 标签的原生 `type` 值 */ htmlType?: string; /** * 设置标签类型 */ component?: "button" | "span" | "a" | "div"; /** * 设置按钮的载入状态 */ loading?: boolean; /** * 是否禁用 */ disabled?: boolean; /** * 点击按钮的回调 */ onClick?: (e: {}) => void; /** * 自定义样式 */ className?: string; } export default class Button extends React.Component { static Group: typeof Group; static Split: typeof Split; }