diff --git a/components/page-header/index.tsx b/components/page-header/index.tsx index 2da1c86e2a..82686f0444 100644 --- a/components/page-header/index.tsx +++ b/components/page-header/index.tsx @@ -4,7 +4,7 @@ import ArrowLeftOutlined from '@ant-design/icons/ArrowLeftOutlined'; import ArrowRightOutlined from '@ant-design/icons/ArrowRightOutlined'; import ResizeObserver from 'rc-resize-observer'; import { ConfigConsumer, ConfigConsumerProps } from '../config-provider'; -import Tag from '../tag'; +import { TagType } from '../tag'; import Breadcrumb, { BreadcrumbProps } from '../breadcrumb'; import Avatar, { AvatarProps } from '../avatar'; import TransButton from '../_util/transButton'; @@ -17,7 +17,7 @@ export interface PageHeaderProps { subTitle?: React.ReactNode; style?: React.CSSProperties; breadcrumb?: BreadcrumbProps; - tags?: typeof Tag | typeof Tag[]; + tags?: React.ReactElement | React.ReactElement[]; footer?: React.ReactNode; extra?: React.ReactNode; avatar?: AvatarProps; diff --git a/components/tag/index.tsx b/components/tag/index.tsx index 4f2208ac75..69d1b052f9 100644 --- a/components/tag/index.tsx +++ b/components/tag/index.tsx @@ -30,7 +30,7 @@ export interface TagProps extends React.HTMLAttributes { const PresetColorRegex = new RegExp(`^(${PresetColorTypes.join('|')})(-inverse)?$`); const PresetStatusColorRegex = new RegExp(`^(${PresetStatusColorTypes.join('|')})$`); -interface TagType extends React.FC { +export interface TagType extends React.FC { CheckableTag: typeof CheckableTag; }