Skip to content

Commit d4736af

Browse files
authored
fix(navbar): align navbar tooltip buttons with new shadcn component (cline#7283)
Switch Navbar actions to the shared Button component and tooptip to use the new shadcn tooltip component so the navbar render correctly and spacing matches the previous design.
1 parent b00053f commit d4736af

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

webview-ui/src/components/menu/Navbar.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { TooltipContent } from "@radix-ui/react-tooltip"
2-
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
31
import { HistoryIcon, PlusIcon, SettingsIcon, UserCircleIcon } from "lucide-react"
42
import { useMemo } from "react"
5-
import { Tooltip, TooltipTrigger } from "@/components/ui/tooltip"
3+
import { Button } from "@/components/ui/button"
4+
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
65
import { TaskServiceClient } from "@/services/grpc-client"
76
import { useExtensionState } from "../../context/ExtensionStateContext"
87

@@ -67,23 +66,22 @@ export const Navbar = () => {
6766

6867
return (
6968
<nav
70-
className="flex-none inline-flex justify-end bg-transparent gap-1 mb-1 z-10 border-none items-center mr-4!"
69+
className="flex-none inline-flex justify-end bg-transparent gap-2 mb-1 z-10 border-none items-center mr-4!"
7170
id="cline-navbar-container">
7271
{SETTINGS_TABS.map((tab) => (
7372
<Tooltip key={`navbar-tooltip-${tab.id}`}>
7473
<TooltipContent side="bottom">{tab.tooltip}</TooltipContent>
7574
<TooltipTrigger asChild>
76-
<VSCodeButton
77-
appearance="icon"
75+
<Button
7876
aria-label={tab.tooltip}
77+
className="p-0 h-7"
7978
data-testid={`tab-${tab.id}`}
8079
key={`navbar-button-${tab.id}`}
8180
onClick={() => tab.navigate()}
82-
style={{ padding: "0px", height: "20px" }}>
83-
<div className="flex items-center gap-1 text-xs whitespace-nowrap min-w-0 w-full">
84-
<tab.icon className="text-(--vscode-foreground)" size={18} strokeWidth={1} />
85-
</div>
86-
</VSCodeButton>
81+
size="icon"
82+
variant="icon">
83+
<tab.icon className="stroke-1 [svg]:size-4" size={18} />
84+
</Button>
8785
</TooltipTrigger>
8886
</Tooltip>
8987
))}

0 commit comments

Comments
 (0)