diff --git a/components/cascader/index.tsx b/components/cascader/index.tsx index ed87ec39f4..24c78d7845 100644 --- a/components/cascader/index.tsx +++ b/components/cascader/index.tsx @@ -53,16 +53,7 @@ export type FieldNamesType = FieldNames; export type FilledFieldNamesType = Required; -export type SemanticName = - | 'root' - | 'prefix' - | 'suffix' - | 'input' - | 'placeholder' - | 'content' - | 'item' - | 'itemContent' - | 'itemRemove'; +export type SemanticName = keyof CascaderSemanticClassNames & keyof CascaderSemanticStyles; export type CascaderSemanticClassNames = { root?: string; diff --git a/components/drawer/DrawerPanel.tsx b/components/drawer/DrawerPanel.tsx index e14950e45c..ed46df9f1b 100644 --- a/components/drawer/DrawerPanel.tsx +++ b/components/drawer/DrawerPanel.tsx @@ -8,18 +8,7 @@ import type { ClosableType, SemanticClassNamesType, SemanticStylesType } from '. import { useComponentConfig } from '../config-provider/context'; import Skeleton from '../skeleton'; -export type SemanticName = - | 'root' - | 'mask' - | 'header' - | 'title' - | 'extra' - | 'section' - | 'body' - | 'footer' - | 'wrapper' - | 'dragger' - | 'close'; +export type SemanticName = keyof DrawerSemanticClassNames & keyof DrawerSemanticStyles; export type DrawerSemanticClassNames = { root?: string; diff --git a/components/modal/interface.ts b/components/modal/interface.ts index 56c3d9b1a5..829947d8b3 100644 --- a/components/modal/interface.ts +++ b/components/modal/interface.ts @@ -11,15 +11,7 @@ import type { Breakpoint } from '../_util/responsiveObserver'; import type { ButtonProps, LegacyButtonType } from '../button/Button'; import type { DirectionType } from '../config-provider'; -export type SemanticName = - | 'root' - | 'header' - | 'body' - | 'footer' - | 'container' - | 'title' - | 'wrapper' - | 'mask'; +export type SemanticName = keyof ModalSemanticClassNames & keyof ModalSemanticStyles; export type ModalSemanticClassNames = { root?: string; diff --git a/components/transfer/index.tsx b/components/transfer/index.tsx index 42bc26c94e..b389014fc8 100644 --- a/components/transfer/index.tsx +++ b/components/transfer/index.tsx @@ -28,18 +28,7 @@ export type { TransferOperationProps } from './Actions'; export type { TransferSearchProps } from './search'; export type { TransferListProps } from './Section'; -export type SemanticName = - | 'root' - | 'section' - | 'header' - | 'title' - | 'body' - | 'list' - | 'item' - | 'itemIcon' - | 'itemContent' - | 'footer' - | 'actions'; +export type SemanticName = keyof TransferSemanticClassNames & keyof TransferSemanticStyles; export type TransferSemanticClassNames = { root?: string;