mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 04:30:06 +08:00
chore(Badge): improve Badge color types (#23026)
This commit is contained in:
parent
5840b92326
commit
9c72b34671
@ -3,8 +3,9 @@ import Animate from 'rc-animate';
|
|||||||
import omit from 'omit.js';
|
import omit from 'omit.js';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import ScrollNumber from './ScrollNumber';
|
import ScrollNumber from './ScrollNumber';
|
||||||
import { PresetColorTypes } from '../_util/colors';
|
import { PresetColorTypes, PresetColorType, PresetStatusColorType } from '../_util/colors';
|
||||||
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
||||||
|
import { LiteralUnion } from '../_util/type';
|
||||||
|
|
||||||
export { ScrollNumberProps } from './ScrollNumber';
|
export { ScrollNumberProps } from './ScrollNumber';
|
||||||
|
|
||||||
@ -20,8 +21,8 @@ export interface BadgeProps {
|
|||||||
prefixCls?: string;
|
prefixCls?: string;
|
||||||
scrollNumberPrefixCls?: string;
|
scrollNumberPrefixCls?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
status?: 'success' | 'processing' | 'default' | 'error' | 'warning';
|
status?: PresetStatusColorType;
|
||||||
color?: string;
|
color?: LiteralUnion<PresetColorType, string>;
|
||||||
text?: React.ReactNode;
|
text?: React.ReactNode;
|
||||||
offset?: [number | string, number | string];
|
offset?: [number | string, number | string];
|
||||||
title?: string;
|
title?: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user