mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
refactor(theme): migrate and refactor type OverrideComponent
by @ant-design/cssinjs-utils
This commit is contained in:
parent
1c6c625ba3
commit
00660bc7e9
@ -1,8 +1,8 @@
|
|||||||
/* eslint-disable import/prefer-default-export */
|
/* eslint-disable import/prefer-default-export */
|
||||||
import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';
|
import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';
|
||||||
|
|
||||||
import type { AliasToken, FullToken } from '../theme/internal';
|
import type { AliasToken, FullToken, OverrideComponent } from '../theme/internal';
|
||||||
import type { CSSUtil, OverrideComponent } from '../theme/util/genComponentStyleHook';
|
import type { CSSUtil } from '../theme/util/genComponentStyleHook';
|
||||||
|
|
||||||
function compactItemVerticalBorder(token: AliasToken & CSSUtil, parentCls: string): CSSObject {
|
function compactItemVerticalBorder(token: AliasToken & CSSUtil, parentCls: string): CSSObject {
|
||||||
return {
|
return {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/* eslint-disable import/prefer-default-export */
|
/* eslint-disable import/prefer-default-export */
|
||||||
import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';
|
import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';
|
||||||
|
|
||||||
import type { AliasToken, FullToken } from '../theme/internal';
|
import type { AliasToken, FullToken, OverrideComponent } from '../theme/internal';
|
||||||
import type { CSSUtil, OverrideComponent } from '../theme/util/genComponentStyleHook';
|
import type { CSSUtil } from '../theme/util/genComponentStyleHook';
|
||||||
|
|
||||||
interface CompactItemOptions {
|
interface CompactItemOptions {
|
||||||
focus?: boolean;
|
focus?: boolean;
|
||||||
|
@ -14,4 +14,6 @@ export type GlobalToken = GlobalTokenTypeUtil<ComponentTokenMap, AliasToken>;
|
|||||||
|
|
||||||
export type OverrideToken = OverrideTokenTypeUtil<ComponentTokenMap, AliasToken>;
|
export type OverrideToken = OverrideTokenTypeUtil<ComponentTokenMap, AliasToken>;
|
||||||
|
|
||||||
export type FullToken<C extends TokenMapKey<ComponentTokenMap>> = FullTokenTypeUtil<ComponentTokenMap, AliasToken, C>;
|
export type OverrideComponent = TokenMapKey<ComponentTokenMap>;
|
||||||
|
|
||||||
|
export type FullToken<C extends TokenMapKey<ComponentTokenMap>> = FullTokenTypeUtil<ComponentTokenMap, AliasToken, C>;
|
||||||
|
@ -11,6 +11,7 @@ export type {
|
|||||||
GlobalToken,
|
GlobalToken,
|
||||||
OverrideToken,
|
OverrideToken,
|
||||||
FullToken,
|
FullToken,
|
||||||
|
OverrideComponent,
|
||||||
} from './cssinjs-utils';
|
} from './cssinjs-utils';
|
||||||
|
|
||||||
export type { AliasToken } from './alias';
|
export type { AliasToken } from './alias';
|
||||||
|
@ -9,6 +9,7 @@ import type {
|
|||||||
GlobalToken,
|
GlobalToken,
|
||||||
UseComponentStyleResult,
|
UseComponentStyleResult,
|
||||||
FullToken,
|
FullToken,
|
||||||
|
OverrideComponent,
|
||||||
} from './interface';
|
} from './interface';
|
||||||
import { PresetColors } from './interface';
|
import { PresetColors } from './interface';
|
||||||
import { getLineHeight } from './themes/shared/genFontSizes';
|
import { getLineHeight } from './themes/shared/genFontSizes';
|
||||||
@ -43,6 +44,7 @@ export type {
|
|||||||
// FIXME: Remove this type
|
// FIXME: Remove this type
|
||||||
AliasToken as DerivativeToken,
|
AliasToken as DerivativeToken,
|
||||||
FullToken,
|
FullToken,
|
||||||
|
OverrideComponent,
|
||||||
GenerateStyle,
|
GenerateStyle,
|
||||||
PresetColorKey,
|
PresetColorKey,
|
||||||
PresetColorType,
|
PresetColorType,
|
||||||
|
Loading…
Reference in New Issue
Block a user