lijianan
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
5 additions and
5 deletions
-
components/_util/type.ts
-
components/badge/Ribbon.tsx
-
components/badge/index.tsx
-
components/tag/index.tsx
-
components/tooltip/index.tsx
|
|
@ -1,2 +1,2 @@ |
|
|
|
/** https://github.com/Microsoft/TypeScript/issues/29729 */ |
|
|
|
export type LiteralUnion<T extends U, U> = T | (U & {}); |
|
|
|
export type LiteralUnion<T extends string> = T | (string & {}); |
|
|
|
|
|
@ -13,7 +13,7 @@ export interface RibbonProps { |
|
|
|
prefixCls?: string; |
|
|
|
style?: React.CSSProperties; // style of ribbon element, not the wrapper
|
|
|
|
text?: React.ReactNode; |
|
|
|
color?: LiteralUnion<PresetColorType, string>; |
|
|
|
color?: LiteralUnion<PresetColorType>; |
|
|
|
children?: React.ReactNode; |
|
|
|
placement?: RibbonPlacement; |
|
|
|
} |
|
|
|
|
|
@ -30,7 +30,7 @@ export interface BadgeProps { |
|
|
|
scrollNumberPrefixCls?: string; |
|
|
|
className?: string; |
|
|
|
status?: PresetStatusColorType; |
|
|
|
color?: LiteralUnion<PresetColorType, string>; |
|
|
|
color?: LiteralUnion<PresetColorType>; |
|
|
|
text?: React.ReactNode; |
|
|
|
size?: 'default' | 'small'; |
|
|
|
offset?: [number | string, number | string]; |
|
|
|
|
|
@ -15,7 +15,7 @@ export type { CheckableTagProps } from './CheckableTag'; |
|
|
|
export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> { |
|
|
|
prefixCls?: string; |
|
|
|
className?: string; |
|
|
|
color?: LiteralUnion<PresetColorType | PresetStatusColorType, string>; |
|
|
|
color?: LiteralUnion<PresetColorType | PresetStatusColorType>; |
|
|
|
closable?: boolean; |
|
|
|
closeIcon?: React.ReactNode; |
|
|
|
/** @deprecated `visible` will be removed in next major version. */ |
|
|
|
|
|
@ -71,7 +71,7 @@ interface LegacyTooltipProps |
|
|
|
export interface AbstractTooltipProps extends LegacyTooltipProps { |
|
|
|
style?: React.CSSProperties; |
|
|
|
className?: string; |
|
|
|
color?: LiteralUnion<PresetColorType, string>; |
|
|
|
color?: LiteralUnion<PresetColorType>; |
|
|
|
placement?: TooltipPlacement; |
|
|
|
builtinPlacements?: typeof Placements; |
|
|
|
openClassName?: string; |
|
|
|