Skip to content

Commit

Permalink
fix(AsideHeader): hide decoration node when headerDecoration=false (#330
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Lunory authored and DarkGenius committed Dec 9, 2024
1 parent de1a015 commit 4b77c40
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 4b77c40

Please sign in to comment.