Skip to content

Commit

Permalink
fix(topology): correct toolbar mode icon
Browse files Browse the repository at this point in the history
  • Loading branch information
tthvo committed May 7, 2023
1 parent 093e003 commit c19f373
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/Topology/Toolbar/TopologyToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ export const TopologyToolbar: React.FC<TopologyToolbarProps> = ({ variant, visua
}
}, [setQuicksearchOpen]);

const actionIcon = React.useMemo(
const modeIcon = React.useMemo(
() => (
<Tooltip
entryDelay={0}
content={isGraphView ? 'Graph View' : 'List View'}
content={isGraphView ? 'List View' : 'Graph View'}
aria="none"
aria-live="polite"
appendTo={portalRoot}
>
<Button className="topology__view-switcher" aria-label="Clipboard" variant="plain" onClick={toggleView}>
{isGraphView ? <TopologyIcon /> : <ListIcon />}
{isGraphView ? <ListIcon /> : <TopologyIcon />}
</Button>
</Tooltip>
),
Expand Down Expand Up @@ -192,7 +192,7 @@ export const TopologyToolbar: React.FC<TopologyToolbarProps> = ({ variant, visua
</ToolbarItem>
) : null}
{!isDisabled ? <ToolbarItem alignment={{ default: 'alignRight' }}>{shortcuts}</ToolbarItem> : null}
<ToolbarItem alignment={isDisabled ? { default: 'alignRight' } : undefined}>{actionIcon}</ToolbarItem>
<ToolbarItem alignment={isDisabled ? { default: 'alignRight' } : undefined}>{modeIcon}</ToolbarItem>
</ToolbarContent>
</Toolbar>
<TopologyFilterChips className="topology__toolbar-chip-content" />
Expand Down

0 comments on commit c19f373

Please sign in to comment.