77 Button ,
88 Chip ,
99 ChipConfirmModal ,
10+ cn ,
1011 DropdownMenu ,
1112 DropdownMenuContent ,
1213 DropdownMenuItem ,
@@ -94,7 +95,6 @@ import { getWorkflowWithValues } from '@/stores/workflows'
9495import { useWorkflowRegistry } from '@/stores/workflows/registry/store'
9596import { useWorkflowStore } from '@/stores/workflows/workflow/store'
9697import type { WorkflowState } from '@/stores/workflows/workflow/types'
97- import './panel-tab.css'
9898
9999const logger = createLogger ( 'Panel' )
100100const EMPTY_COPILOT_CHATS : readonly CopilotChatListItem [ ] = [ ]
@@ -115,20 +115,30 @@ function copilotDraftKey(
115115 return workflowId ? `${ workspaceId } :workflow-copilot:${ workflowId } :${ chatId ?? 'new' } ` : undefined
116116}
117117
118- interface PanelTabChipProps {
118+ interface PanelTabButtonProps {
119119 tab : PanelTab
120120 active : boolean
121121 onClick : ( ) => void
122122 children : string
123123}
124124
125- function PanelTabChip ( { tab, active, onClick, children } : PanelTabChipProps ) {
125+ function PanelTabButton ( { tab, active, onClick, children } : PanelTabButtonProps ) {
126126 return (
127- < Chip active = { active } aria-pressed = { active } onClick = { onClick } data-tab-button = { tab } >
128- < span className = { active ? 'text-[var(--text-primary)]' : 'text-[var(--text-secondary)]' } >
129- { children }
130- </ span >
131- </ Chip >
127+ < Button
128+ className = { cn (
129+ 'h-[28px] rounded-md border py-[5px] text-[12.5px]' ,
130+ tab === 'copilot' && 'truncate' ,
131+ active
132+ ? 'border-[var(--border-1)]'
133+ : 'border-transparent hover-hover:border-[var(--border-1)] hover-hover:bg-[var(--surface-5)]'
134+ ) }
135+ variant = { active ? 'active' : 'ghost' }
136+ aria-pressed = { active }
137+ onClick = { onClick }
138+ data-tab-button = { tab }
139+ >
140+ { children }
141+ </ Button >
132142 )
133143}
134144/**
@@ -876,28 +886,28 @@ export const Panel = memo(function Panel() {
876886 < div className = 'flex shrink-0 items-center justify-between px-2 pt-3.5' >
877887 < div className = 'flex gap-1' >
878888 { isCopilotTabAvailable && (
879- < PanelTabChip
889+ < PanelTabButton
880890 tab = 'copilot'
881891 active = { _hasHydrated && activeTab === 'copilot' }
882892 onClick = { ( ) => handleTabClick ( 'copilot' ) }
883893 >
884894 Chat
885- </ PanelTabChip >
895+ </ PanelTabButton >
886896 ) }
887- < PanelTabChip
897+ < PanelTabButton
888898 tab = 'toolbar'
889899 active = { _hasHydrated && activeTab === 'toolbar' }
890900 onClick = { ( ) => handleTabClick ( 'toolbar' ) }
891901 >
892902 Toolbar
893- </ PanelTabChip >
894- < PanelTabChip
903+ </ PanelTabButton >
904+ < PanelTabButton
895905 tab = 'editor'
896906 active = { _hasHydrated && activeTab === 'editor' }
897907 onClick = { ( ) => handleTabClick ( 'editor' ) }
898908 >
899909 Editor
900- </ PanelTabChip >
910+ </ PanelTabButton >
901911 </ div >
902912 </ div >
903913
0 commit comments