Skip to content

Commit c534b2c

Browse files
(feat )O3-2664: Allow app menu to expand based on the width of its content (#854)
* O3-2664 Allow primary navigation app panel to expand based on content available * Fixup --------- Co-authored-by: Dennis Kigen <kigen.work@gmail.com>
1 parent 0f81b27 commit c534b2c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/apps/esm-primary-navigation-app/src/components/navbar-header-panels/app-menu-panel.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const AppMenuPanel: React.FC<AppMenuProps> = ({ expanded, hidePanel }) => {
1818

1919
return (
2020
<HeaderPanel
21-
ref={appMenuRef as any}
22-
className={styles.headerPanel}
21+
ref={appMenuRef}
22+
className={classNames({ [styles.headerPanel]: expanded })}
2323
aria-label="App Menu Panel"
2424
expanded={expanded}
2525
onClick={() => hidePanel()}

packages/apps/esm-primary-navigation-app/src/components/navbar-header-panels/app-menu-panel.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@
2424
.launchIcon {
2525
margin-left: spacing.$spacing-03;
2626
}
27+
28+
.headerPanel {
29+
width: fit-content;
30+
}

0 commit comments

Comments
 (0)