Skip to content

Commit

Permalink
fix(appbar): refactor appbar component #closes2114
Browse files Browse the repository at this point in the history
  • Loading branch information
kaminderpal committed May 16, 2024
1 parent 8452f4f commit 0914356
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/geoview-core/src/core/components/app-bar/app-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ export function AppBar(props: AppBarProps): JSX.Element {

// #endregion

/**
* Re-order the footer tab buttons.
*/
const { topGroupNames, bottomGroupNames } = useMemo(() => {
// Log
logger.logTraceUseMemo('APP-BAR - panels');
Expand All @@ -304,6 +307,11 @@ export function AppBar(props: AppBarProps): JSX.Element {
return { topGroupNames: topGroup, bottomGroupNames: bottomGroup };
}, [buttonPanelGroups]);

/**
* Render Tab groups in appbar.
* @param {string[]} groupNames group that will be rendered in appbar.
* @returns JSX.Element
*/
const renderButtonGroup = (groupNames: string[]): ReactNode => {
return (
<>
Expand All @@ -326,7 +334,7 @@ export function AppBar(props: AppBarProps): JSX.Element {
tooltipPlacement="right"
className={`style3 ${activeAppBarPanelId === buttonPanel.button.id ? 'active' : ''}`}
size="small"
onClick={(): void => handleButtonClicked(buttonPanel.button.id!, groupName)}
onClick={() => handleButtonClicked(buttonPanel.button.id!, groupName)}
>
{buttonPanel.button.children}
</IconButton>
Expand Down

0 comments on commit 0914356

Please sign in to comment.