Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 7f05638

Browse files
committed
style: improve hook settings UI with proper button styling
- Style 'Add' button on each event to look like a proper button with variant='secondary' and hover:brightness-75 for darker hover effect - Remove redundant 'Create New Hook' button from footer toolbar - Clean up unused handleCreateNewHook callback and Plus import
1 parent 46d5c9a commit 7f05638

2 files changed

Lines changed: 3 additions & 17 deletions

File tree

webview-ui/src/components/settings/HooksSettings.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState, useCallback } from "react"
2-
import { Plus, FolderOpen, RefreshCw, GripVertical, Link2, AlertCircle, Loader2 } from "lucide-react"
2+
import { FolderOpen, RefreshCw, GripVertical, Link2, AlertCircle, Loader2 } from "lucide-react"
33
import { DndContext, DragOverlay, closestCenter } from "@dnd-kit/core"
44

55
import { hookEventTypes, type HookEventType, type HookWithMetadata } from "@roo-code/types"
@@ -99,12 +99,6 @@ export const HooksSettings: React.FC = () => {
9999
setShowCreateDialog(true)
100100
}, [])
101101

102-
// Handler for creating a new hook from footer button
103-
const handleCreateNewHook = useCallback(() => {
104-
setCreateForEventType(undefined)
105-
setShowCreateDialog(true)
106-
}, [])
107-
108102
// Handler for hook creation
109103
const handleHookCreate = useCallback(
110104
(hook: HookWithMetadata) => {
@@ -255,13 +249,6 @@ export const HooksSettings: React.FC = () => {
255249
{/* Footer Buttons */}
256250
<SearchableSetting settingId="hooks-actions" section="hooks" label="Hook Actions" className="mt-6">
257251
<div className="flex flex-wrap gap-2">
258-
<Button
259-
variant="secondary"
260-
onClick={handleCreateNewHook}
261-
disabled={!hooksEnabled || isLoading}>
262-
<Plus className="w-4 h-4 mr-1" />
263-
Create New Hook
264-
</Button>
265252
<Button variant="ghost" onClick={openGlobalFolder}>
266253
<FolderOpen className="w-4 h-4 mr-1" />
267254
Open Global Folder

webview-ui/src/components/settings/HooksSettings/HookEventGroup.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ export const HookEventGroup: React.FC<HookEventGroupProps> = ({
9595

9696
{/* Add button */}
9797
<Button
98-
variant="ghost"
99-
size="sm"
100-
className="opacity-60 hover:opacity-100"
98+
variant="secondary"
99+
className="py-1 hover:brightness-75"
101100
onClick={(e) => {
102101
e.stopPropagation()
103102
onAddHook()

0 commit comments

Comments
 (0)