From 2f5724578fa3ff8bcb27f8f73408e716e6bd0c17 Mon Sep 17 00:00:00 2001 From: QiShaoXuan Date: Tue, 31 Jan 2023 13:18:37 +0800 Subject: [PATCH] feat: modify Content component --- packages/app/src/ui/layout/Content.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/app/src/ui/layout/Content.tsx b/packages/app/src/ui/layout/Content.tsx index 510f3886a6..38d13251e5 100644 --- a/packages/app/src/ui/layout/Content.tsx +++ b/packages/app/src/ui/layout/Content.tsx @@ -14,8 +14,21 @@ export type ContentProps = { lineNum?: number; children: string; }; - -export const Content = styled.div( +export const Content = styled('div', { + shouldForwardProp: prop => { + return ![ + 'color', + 'fontSize', + 'weight', + 'lineHeight', + 'ellipsis', + 'lineNum', + 'width', + 'maxWidth', + 'align', + ].includes(prop); + }, +})( ({ theme, color,