Skip to content

Commit ea45c0d

Browse files
committed
fix: unify button styling in QueryWorkspace
- Replace emoji with Radix icons for all buttons - Use consistent button variants (soft for secondary, solid for primary) - Add icons to all action buttons (AI, Format, Run) - Use theme color for Run button instead of hardcoded green - Ensure all buttons are same size and have consistent hover effects
1 parent 09251c4 commit ea45c0d

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/renderer/components/QueryWorkspace/QueryWorkspace.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { QueryTabs } from '../QueryTabs/QueryTabs'
77
import { TableView } from '../TableView/TableView'
88
import { AIAssistant } from '../AIAssistant'
99
import { SqlEditor } from './SqlEditor'
10-
import { ExclamationTriangleIcon } from '@radix-ui/react-icons'
10+
import { ExclamationTriangleIcon, MagicWandIcon, CodeIcon, PlayIcon } from '@radix-ui/react-icons'
1111

1212
import { exportToCSV, exportToJSON } from '../../utils/exportData'
1313
import { Tab, QueryTab, TableTab, QueryExecutionResult } from '../../types/tabs'
@@ -19,7 +19,6 @@ import {
1919
} from '../../utils/queryParser'
2020
import './QueryWorkspace.css'
2121

22-
2322
const DEFAULT_LIMIT = 100
2423

2524
interface QueryWorkspaceProps {
@@ -338,19 +337,21 @@ export function QueryWorkspace({ connectionId, onOpenTableTab }: QueryWorkspaceP
338337
<Flex gap="2" align="center">
339338
<Button
340339
size="1"
341-
variant={showAIPanel ? 'solid' : 'ghost'}
340+
variant={showAIPanel ? 'solid' : 'soft'}
342341
onClick={() => setShowAIPanel(!showAIPanel)}
343-
style={{ minWidth: '60px' }}
344342
>
345-
✨ AI
343+
<MagicWandIcon />
344+
AI
346345
</Button>
347-
<Button size="1" variant="ghost" onClick={formatQuery}>
346+
<Button size="1" variant="soft" onClick={formatQuery}>
347+
<CodeIcon />
348348
Format
349349
</Button>
350350
<Button
351+
size="1"
352+
variant="solid"
351353
onClick={handleExecuteQuery}
352354
disabled={isExecuting || (!activeTab.query && !selectedText.trim())}
353-
size="1"
354355
>
355356
{isExecuting ? (
356357
<>
@@ -359,8 +360,9 @@ export function QueryWorkspace({ connectionId, onOpenTableTab }: QueryWorkspaceP
359360
</>
360361
) : (
361362
<>
363+
<PlayIcon />
362364
Run
363-
<Text size="1" color="gray" ml="1">
365+
<Text size="1" ml="1" style={{ opacity: 0.7 }}>
364366
⌘↵
365367
</Text>
366368
</>

0 commit comments

Comments
 (0)