mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
refactor(theme): migrate and refactor type OverrideToken
by @ant-design/cssinjs-utils
This commit is contained in:
parent
64f26bd970
commit
c057cb2113
@ -1,5 +1,6 @@
|
|||||||
import type {
|
import type {
|
||||||
GlobalToken as GlobalTokenTypeUtil,
|
GlobalToken as GlobalTokenTypeUtil,
|
||||||
|
OverrideTokenMap as OverrideTokenTypeUtil,
|
||||||
} from '@ant-design/cssinjs-utils';
|
} from '@ant-design/cssinjs-utils';
|
||||||
|
|
||||||
import type { AliasToken } from './alias';
|
import type { AliasToken } from './alias';
|
||||||
@ -8,3 +9,5 @@ import type { ComponentTokenMap } from './components';
|
|||||||
|
|
||||||
/** Final token which contains the components level override */
|
/** Final token which contains the components level override */
|
||||||
export type GlobalToken = GlobalTokenTypeUtil<ComponentTokenMap, AliasToken>;
|
export type GlobalToken = GlobalTokenTypeUtil<ComponentTokenMap, AliasToken>;
|
||||||
|
|
||||||
|
export type OverrideToken = OverrideTokenTypeUtil<ComponentTokenMap, AliasToken>;
|
||||||
|
@ -2,17 +2,12 @@ import type { CSSInterpolation, DerivativeFunc } from '@ant-design/cssinjs';
|
|||||||
|
|
||||||
import type { AnyObject } from '../../_util/type';
|
import type { AnyObject } from '../../_util/type';
|
||||||
import type { AliasToken } from './alias';
|
import type { AliasToken } from './alias';
|
||||||
import type { ComponentTokenMap } from './components';
|
|
||||||
import type { MapToken } from './maps';
|
import type { MapToken } from './maps';
|
||||||
import type { SeedToken } from './seeds';
|
import type { SeedToken } from './seeds';
|
||||||
|
|
||||||
export type MappingAlgorithm = DerivativeFunc<SeedToken, MapToken>;
|
export type MappingAlgorithm = DerivativeFunc<SeedToken, MapToken>;
|
||||||
|
|
||||||
export type OverrideToken = {
|
export type { GlobalToken, OverrideToken } from './cssinjs-utils';
|
||||||
[key in keyof ComponentTokenMap]: Partial<ComponentTokenMap[key]> & Partial<AliasToken>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type { GlobalToken } from './cssinjs-utils';
|
|
||||||
|
|
||||||
export type { AliasToken } from './alias';
|
export type { AliasToken } from './alias';
|
||||||
export type { ComponentTokenMap } from './components';
|
export type { ComponentTokenMap } from './components';
|
||||||
|
Loading…
Reference in New Issue
Block a user