From f0c82d5aa79f579bc57f337cf4776b0f916164d5 Mon Sep 17 00:00:00 2001 From: Tom Xu Date: Tue, 28 Apr 2020 17:42:23 +0800 Subject: [PATCH] fix: PageHeader tag ts typo (#23712) --- components/page-header/index.tsx | 4 ++-- components/tag/index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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; }