Skip to content

Commit

Permalink
fix: footer items should be in bottom even if menuItems is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-efremoff committed Nov 24, 2022
1 parent df865df commit d55e55e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/components/AsideHeader/AsideHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ $block: '.#{variables.$ns}aside-header';
}
}

&__menu-items {
flex-grow: 1;
}

&__footer {
flex-shrink: 0;
width: 100%;
Expand Down
18 changes: 11 additions & 7 deletions src/components/AsideHeader/AsideHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,17 @@ export class AsideHeader extends React.Component<AsideHeaderInnerProps> {
<div className={b('aside-popup-anchor')} ref={this.asideRef} />
<div className={b('aside-content')}>
{this.renderHeader()}
<CompositeBar
items={menuItems}
compact={compact}
enableCollapsing={true}
dict={dict}
onItemClick={this.onItemClick}
/>
{menuItems?.length ? (
<CompositeBar
items={menuItems}
compact={compact}
enableCollapsing={true}
dict={dict}
onItemClick={this.onItemClick}
/>
) : (
<div className={b('menu-items')} />
)}
{this.renderFooter(size)}
{this.renderCollapseButton()}
</div>
Expand Down

0 comments on commit d55e55e

Please sign in to comment.