File tree Expand file tree Collapse file tree 4 files changed +22
-8
lines changed
Expand file tree Collapse file tree 4 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,12 @@ $block: '.#{variables.$ns}aside-header';
197197 display : flex ;
198198 align-items : center ;
199199 justify-content : space-between ;
200+
201+ & _without-logo {
202+ padding-bottom : var (--g-spacing-2 );
203+ margin-bottom : var (--g-spacing-2 );
204+ border-bottom : solid 1px var (--g-color-line-generic );
205+ }
200206 }
201207
202208 & __logo-button & __logo-icon-place {
@@ -264,4 +270,13 @@ $block: '.#{variables.$ns}aside-header';
264270 padding-left : var (--gn-aside-header-min-width );
265271 }
266272 }
273+
274+ & __pin-button {
275+ margin-right : 10px ;
276+ margin-left : auto ;
277+
278+ & _compact {
279+ margin-right : auto ;
280+ }
281+ }
267282}
Original file line number Diff line number Diff line change 33$block : ' .#{variables .$ns } collapse-button' ;
44
55#{$block } {
6- margin-right : 2px ;
7- margin-left : auto ;
8-
96 & _compact {
107 #{$block } __icon {
118 transform : rotate (180deg );
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const CollapseButton = ({className}: CollapseButtonProps) => {
3434 < Button
3535 view = "flat-secondary"
3636 size = "l"
37- className = { b ( { compact : compact } , className ) }
37+ className = { b ( { compact} , className ) }
3838 onClick = { onCollapseButtonClick }
3939 aria-label = { buttonTitle }
4040 >
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ export const Header = () => {
2828 hideCollapseButton,
2929 } = useAsideHeaderInnerContext ( ) ;
3030
31+ const compact = ! isExpanded ;
32+
3133 const items = useGroupedMenuItems ( subheaderItems || DEFAULT_SUBHEADER_ITEMS ) ;
3234
3335 const onLogoClick = useCallback (
@@ -40,25 +42,25 @@ export const Header = () => {
4042
4143 return (
4244 < div className = { b ( 'header' , { [ 'with-decoration' ] : headerDecoration } ) } >
43- < div className = { b ( 'logo-container' ) } >
45+ < div className = { b ( 'logo-container' , { 'without-logo' : ! logo } ) } >
4446 { logo && (
4547 < Logo
4648 { ...logo }
4749 onClick = { onLogoClick }
48- compact = { ! isExpanded }
50+ compact = { compact }
4951 buttonClassName = { b ( 'logo-button' ) }
5052 iconPlaceClassName = { b ( 'logo-icon-place' ) }
5153 />
5254 ) }
5355
54- { ! hideCollapseButton && isExpanded && < CollapseButton /> }
56+ { ! hideCollapseButton && < CollapseButton className = { b ( 'pin-button' , { compact } ) } /> }
5557 </ div >
5658
5759 < CompositeBar
5860 compositeId = { HEADER_COMPOSITE_ID }
5961 menuItemClassName = { b ( 'menu-item' ) }
6062 type = "subheader"
61- compact = { ! isExpanded }
63+ compact = { compact }
6264 items = { items }
6365 onItemClick = { onItemClick }
6466 />
You can’t perform that action at this time.
0 commit comments