Skip to content

Commit

Permalink
fix(AsideHeader): hide decoration node when headerDecoration=false
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunory committed Oct 23, 2024
1 parent c85b17b commit 2a4a8ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/components/AsideHeader/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ export const Header = () => {
onItemClick={onItemClick}
/>

<Icon
data={headerDividerCollapsedIcon}
className={b('header-divider')}
width={ASIDE_HEADER_COMPACT_WIDTH}
height={HEADER_DIVIDER_HEIGHT}
/>
{headerDecoration && (
<Icon
data={headerDividerCollapsedIcon}
className={b('header-divider')}
width={ASIDE_HEADER_COMPACT_WIDTH}
height={HEADER_DIVIDER_HEIGHT}
/>
)}
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const AsideFallback: React.FC<Props> = ({headerDecoration, subheaderItems
<div className={b('aside-content', {'with-decoration': headerDecoration})}>
<div className={b('header', {'with-decoration': headerDecoration})}>
<div style={{height: subheaderHeight}} />
{compact ? (
{compact && headerDecoration ? (
<Icon
data={headerDividerCollapsedIcon}
className={b('header-divider')}
Expand Down

0 comments on commit 2a4a8ef

Please sign in to comment.