Badge add type prop, close #3425

This commit is contained in:
梁灏 2018-06-21 15:04:49 +08:00
parent 457fe0874c
commit cc27c42a0d
4 changed files with 51 additions and 2 deletions

View file

@ -42,6 +42,11 @@
return oneOf(value, ['success', 'processing', 'default', 'error', 'warning']);
}
},
type: {
validator (value) {
return oneOf(value, ['success', 'primary', 'normal', 'error', 'warning', 'info']);
}
},
offset: {
type: Array
}
@ -58,7 +63,8 @@
`${prefixCls}-count`,
{
[`${this.className}`]: !!this.className,
[`${prefixCls}-count-alone`]: this.alone
[`${prefixCls}-count-alone`]: this.alone,
[`${prefixCls}-count-${this.type}`]: !!this.type
}
];
},