mirror of
https://github.com/wahyd4/ant-design.git
synced 2026-08-09 04:46:52 +10:00
chore: add definition for Button[onMouseDown], close: #6054
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user