Skip to content

Commit 769bf2f

Browse files
committed
Updated buttons to @/components/ui/button
1 parent 8d045a4 commit 769bf2f

File tree

4 files changed

+95
-84
lines changed

4 files changed

+95
-84
lines changed

webview-ui/src/components/history/HistoryView.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { DeleteTaskDialog } from "./DeleteTaskDialog"
33
import { BatchDeleteTaskDialog } from "./BatchDeleteTaskDialog"
44
import prettyBytes from "pretty-bytes"
55
import { Virtuoso } from "react-virtuoso"
6+
67
import {
7-
VSCodeButton,
88
VSCodeTextField,
99
VSCodeRadioGroup,
1010
VSCodeRadio,
@@ -76,8 +76,8 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
7676
<div className="flex justify-between items-center">
7777
<h3 className="text-vscode-foreground m-0">{t("history:history")}</h3>
7878
<div className="flex gap-2">
79-
<VSCodeButton
80-
appearance={isSelectionMode ? "primary" : "secondary"}
79+
<Button
80+
variant={isSelectionMode ? "default" : "secondary"}
8181
onClick={toggleSelectionMode}
8282
title={
8383
isSelectionMode
@@ -88,8 +88,8 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
8888
className={`codicon ${isSelectionMode ? "codicon-check-all" : "codicon-checklist"} mr-1`}
8989
/>
9090
{isSelectionMode ? t("history:exitSelection") : t("history:selectionMode")}
91-
</VSCodeButton>
92-
<VSCodeButton onClick={onDone}>{t("history:done")}</VSCodeButton>
91+
</Button>
92+
<Button onClick={onDone}>{t("history:done")}</Button>
9393
</div>
9494
</div>
9595
<div className="flex flex-col gap-2">
@@ -427,12 +427,12 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
427427
{t("history:selectedItems", { selected: selectedTaskIds.length, total: tasks.length })}
428428
</div>
429429
<div className="flex gap-2">
430-
<VSCodeButton appearance="secondary" onClick={() => setSelectedTaskIds([])}>
430+
<Button variant="secondary" onClick={() => setSelectedTaskIds([])}>
431431
{t("history:clearSelection")}
432-
</VSCodeButton>
433-
<VSCodeButton appearance="primary" onClick={handleBatchDelete}>
432+
</Button>
433+
<Button variant="default" onClick={handleBatchDelete}>
434434
{t("history:deleteSelected")}
435-
</VSCodeButton>
435+
</Button>
436436
</div>
437437
</div>
438438
)}

webview-ui/src/components/mcp/McpView.tsx

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useState } from "react"
2+
import { Button } from "@/components/ui/button"
23
import {
3-
VSCodeButton,
44
VSCodeCheckbox,
55
VSCodeLink,
66
VSCodePanels,
@@ -39,7 +39,7 @@ const McpView = ({ onDone }: McpViewProps) => {
3939
<Tab>
4040
<TabHeader className="flex justify-between items-center">
4141
<h3 className="text-vscode-foreground m-0">{t("mcp:title")}</h3>
42-
<VSCodeButton onClick={onDone}>{t("mcp:done")}</VSCodeButton>
42+
<Button onClick={onDone}>{t("mcp:done")}</Button>
4343
</TabHeader>
4444

4545
<TabContent>
@@ -100,24 +100,24 @@ const McpView = ({ onDone }: McpViewProps) => {
100100

101101
{/* Edit Settings Buttons */}
102102
<div style={{ marginTop: "10px", width: "100%", display: "flex", gap: "10px" }}>
103-
<VSCodeButton
104-
appearance="secondary"
103+
<Button
104+
variant="secondary"
105105
style={{ flex: 1 }}
106106
onClick={() => {
107107
vscode.postMessage({ type: "openMcpSettings" })
108108
}}>
109109
<span className="codicon codicon-edit" style={{ marginRight: "6px" }}></span>
110110
{t("mcp:editGlobalMCP")}
111-
</VSCodeButton>
112-
<VSCodeButton
113-
appearance="secondary"
111+
</Button>
112+
<Button
113+
variant="secondary"
114114
style={{ flex: 1 }}
115115
onClick={() => {
116116
vscode.postMessage({ type: "openProjectMcpSettings" })
117117
}}>
118118
<span className="codicon codicon-edit" style={{ marginRight: "6px" }}></span>
119119
{t("mcp:editProjectMCP")}
120-
</VSCodeButton>
120+
</Button>
121121
</div>
122122
</>
123123
)}
@@ -229,19 +229,21 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM
229229
<div
230230
style={{ display: "flex", alignItems: "center", marginRight: "8px" }}
231231
onClick={(e) => e.stopPropagation()}>
232-
<VSCodeButton
233-
appearance="icon"
232+
<Button
233+
variant="ghost"
234+
size="icon"
234235
onClick={() => setShowDeleteConfirm(true)}
235236
style={{ marginRight: "8px" }}>
236237
<span className="codicon codicon-trash" style={{ fontSize: "14px" }}></span>
237-
</VSCodeButton>
238-
<VSCodeButton
239-
appearance="icon"
238+
</Button>
239+
<Button
240+
variant="ghost"
241+
size="icon"
240242
onClick={handleRestart}
241243
disabled={server.status === "connecting"}
242244
style={{ marginRight: "8px" }}>
243245
<span className="codicon codicon-refresh" style={{ fontSize: "14px" }}></span>
244-
</VSCodeButton>
246+
</Button>
245247
<div
246248
role="switch"
247249
aria-checked={!server.disabled}
@@ -320,15 +322,15 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM
320322
}}>
321323
{server.error}
322324
</div>
323-
<VSCodeButton
324-
appearance="secondary"
325+
<Button
326+
variant="secondary"
325327
onClick={handleRestart}
326328
disabled={server.status === "connecting"}
327329
style={{ width: "calc(100% - 20px)", margin: "0 10px 10px 10px" }}>
328330
{server.status === "connecting"
329331
? t("mcp:serverStatus.retrying")
330332
: t("mcp:serverStatus.retryConnection")}
331-
</VSCodeButton>
333+
</Button>
332334
</div>
333335
) : (
334336
isExpanded && (
@@ -444,12 +446,12 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM
444446
</DialogDescription>
445447
</DialogHeader>
446448
<DialogFooter>
447-
<VSCodeButton appearance="secondary" onClick={() => setShowDeleteConfirm(false)}>
449+
<Button variant="secondary" onClick={() => setShowDeleteConfirm(false)}>
448450
{t("mcp:deleteDialog.cancel")}
449-
</VSCodeButton>
450-
<VSCodeButton appearance="primary" onClick={handleDelete}>
451+
</Button>
452+
<Button variant="default" onClick={handleDelete}>
451453
{t("mcp:deleteDialog.delete")}
452-
</VSCodeButton>
454+
</Button>
453455
</DialogFooter>
454456
</DialogContent>
455457
</Dialog>

0 commit comments

Comments
 (0)