chore: add definition for Button[onMouseDown], close: #6054

This commit is contained in:
Benjy Cui
2017-05-16 11:55:17 +08:00
parent 9ce3a1ea35
commit 2feb3d42e6
3 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -1,8 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Icon from '../icon';
import omit from 'omit.js';
import Icon from '../icon';
import Group from './button-group';
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
@@ -44,6 +45,7 @@ export interface ButtonProps {
size?: ButtonSize;
onClick?: React.FormEventHandler<any>;
onMouseUp?: React.FormEventHandler<any>;
onMouseDown?: React.FormEventHandler<any>;
loading?: boolean | { delay?: number };
disabled?: boolean;
style?: React.CSSProperties;
@@ -53,7 +55,7 @@ export interface ButtonProps {
}
export default class Button extends React.Component<ButtonProps, any> {
static Group: any;
static Group: typeof Group;
static __ANT_BUTTON = true;
static defaultProps = {
+1 -1
View File
@@ -7,7 +7,7 @@ import { AbstractCheckboxProps } from '../checkbox/Checkbox';
import RadioGroup from './group';
import RadioButton from './radioButton';
export interface RadioProps extends AbstractCheckboxProps {}
export type RadioProps = AbstractCheckboxProps;
export default class Radio extends React.Component<RadioProps, any> {
static Group: typeof RadioGroup;
+1 -1
View File
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { AbstractCheckboxProps } from '../checkbox/Checkbox';
import Radio from './radio';
export interface RadioButtonProps extends AbstractCheckboxProps {}
export type RadioButtonProps = AbstractCheckboxProps;
export default class RadioButton extends React.Component<RadioButtonProps, any> {
static defaultProps = {