mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
fix: remove danger warning
This commit is contained in:
parent
37a85366f3
commit
ab15b3a84c
@ -9,7 +9,6 @@ import omit from 'omit.js';
|
|||||||
import Group from './button-group';
|
import Group from './button-group';
|
||||||
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
||||||
import Wave from '../_util/wave';
|
import Wave from '../_util/wave';
|
||||||
import warning from '../_util/warning';
|
|
||||||
import { Omit, tuple } from '../_util/type';
|
import { Omit, tuple } from '../_util/type';
|
||||||
|
|
||||||
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
|
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
|
||||||
@ -151,11 +150,6 @@ class Button extends React.Component<ButtonProps, ButtonState> {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.fixTwoCNChar();
|
this.fixTwoCNChar();
|
||||||
warning(
|
|
||||||
!('type' in this.props && this.props.type === 'danger'),
|
|
||||||
'Button',
|
|
||||||
'`type="danger"` is deprecated, please use `danger` instead.',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps: ButtonProps) {
|
componentDidUpdate(prevProps: ButtonProps) {
|
||||||
|
Loading…
Reference in New Issue
Block a user