From c5299c62089bb4dc88440c8f113f429c665af178 Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Fri, 21 Jun 2024 18:22:50 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20Fix=20Collapse=20style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Collapse/style.ts | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/Collapse/style.ts b/src/Collapse/style.ts index e4680ae8..bfded9ae 100644 --- a/src/Collapse/style.ts +++ b/src/Collapse/style.ts @@ -31,17 +31,24 @@ export const useStyles = createStyles( `; const blockStyle = cx( + css` + background: transparent !important; + .${prefixCls}-collapse-item { + background: ${token.colorFillQuaternary} !important; + } + + .${prefixCls}-collapse-header { + background: ${token.colorFillTertiary} !important; + } + `, isSplit ? css` - background: transparent; .${prefixCls}-collapse-item { overflow: hidden; - background: ${token.colorFillQuaternary}; border-radius: ${token.borderRadiusLG}px !important; } ` : css` - background: ${token.colorFillQuaternary}; border-radius: ${token.borderRadiusLG}px; `, ); @@ -80,22 +87,30 @@ export const useStyles = createStyles( ); const defaultStyle = cx( + css` + background: transparent !important; + .${prefixCls}-collapse-item { + background: transparent !important; + } + + .${prefixCls}-collapse-header { + background: ${token.colorFillTertiary} !important; + } + `, isSplit ? css` background: transparent; .${prefixCls}-collapse-item { overflow: hidden; - background: ${token.colorFillQuaternary}; border: 1px solid ${token.colorBorderSecondary} !important; border-radius: ${token.borderRadiusLG}px !important; } ` : css` - background: ${token.colorFillQuaternary}; border-radius: ${token.borderRadiusLG}px; - .${prefixCls}-collapse-item:not(:last-child) { + .${prefixCls}-collapse-item:not(:first-child) { .${prefixCls}-collapse-header { - border-block-end: 1px solid ${token.colorBorderSecondary}; + border-block-start: 1px solid ${token.colorBorderSecondary}; } } `,