Skip to content

Commit

Permalink
💄 style: Fix Collapse style
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jun 21, 2024
1 parent c8c3364 commit c5299c6
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions src/Collapse/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
`,
);
Expand Down Expand Up @@ -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};
}
}
`,
Expand Down

0 comments on commit c5299c6

Please sign in to comment.