Skip to content

Commit

Permalink
chore: add definition for Button[onMouseDown], close: ant-design#6054
Browse files Browse the repository at this point in the history
  • Loading branch information
benjycui committed May 16, 2017
1 parent 9ce3a1e commit 2feb3d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions components/button/button.tsx
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion components/radio/radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/radio/radioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 2feb3d4

Please sign in to comment.