From 1c1ce39f72dc3bf3808b8ea76da3ecc5b4c589ab Mon Sep 17 00:00:00 2001 From: Haixing <65376724+HaixingOoO@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:48:05 +0800 Subject: [PATCH] fix(descriptions): fix descriptions typo (#2818) --- src/descriptions/Descriptions.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/descriptions/Descriptions.tsx b/src/descriptions/Descriptions.tsx index 05b328a6c5..3e94396922 100644 --- a/src/descriptions/Descriptions.tsx +++ b/src/descriptions/Descriptions.tsx @@ -7,7 +7,7 @@ import { descriptionItemDefaultProps, descriptionsDefaultProps } from './default import useDefaultProps from '../hooks/useDefaultProps'; import useConfig from '../hooks/useConfig'; import useCommonClassName from '../hooks/useCommonClassName'; -import { LayoutEnum } from '../common'; +import { LayoutEnum, StyledProps } from '../common'; import { DescriptionsContext } from './DescriptionsContext'; import DescriptionsItem from './DescriptionsItem'; import Row from './Row'; @@ -26,14 +26,15 @@ import Row from './Row'; * TDescriptionsItem:获取 item 数据(span, label, content) */ -export type DescriptionsProps = TdDescriptionsProps & { - children?: React.ReactNode; -}; +export type DescriptionsProps = TdDescriptionsProps & + StyledProps & { + children?: React.ReactNode; + }; const Descriptions = (DescriptionsProps: DescriptionsProps) => { const props = useDefaultProps(DescriptionsProps, descriptionsDefaultProps); - const { title, bordered, column, layout, items: rowItems, children } = props; + const { className, style, title, bordered, column, layout, items: rowItems, children } = props; const { classPrefix } = useConfig(); @@ -131,7 +132,7 @@ const Descriptions = (DescriptionsProps: DescriptionsProps) => { return ( -
+
{renderHeader()} {renderBody()}