Skip to content

Commit 408877d

Browse files
chore: adjust button size responsive tool bar (#200)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 1feac63 commit 408877d

File tree

1 file changed

+28
-29
lines changed

1 file changed

+28
-29
lines changed

frontend/src/components/chat/code-engine/responsive-toolbar.tsx

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -277,32 +277,35 @@ const ResponsiveToolbar = ({
277277
<div className="flex items-center space-x-2">
278278
<Button
279279
variant={activeTab === 'preview' ? 'default' : 'outline'}
280+
size="sm"
280281
className="text-sm"
281282
onClick={() => setActiveTab('preview')}
282283
disabled={isLoading}
283284
>
284-
<Eye className="w-4 h-4 mr-1" />
285+
<Eye className="w-3 h-3 mr-1" />
285286
Preview
286287
</Button>
287288
{visibleTabs >= 2 && (
288289
<Button
289290
variant={activeTab === 'code' ? 'default' : 'outline'}
291+
size="sm"
290292
className="text-sm"
291293
onClick={() => setActiveTab('code')}
292294
disabled={isLoading}
293295
>
294-
<CodeIcon className="w-4 h-4 mr-1" />
296+
<CodeIcon className="w-3 h-3 mr-1" />
295297
Code
296298
</Button>
297299
)}
298300
{visibleTabs >= 3 && (
299301
<Button
300302
variant={activeTab === 'console' ? 'default' : 'outline'}
303+
size="sm"
301304
className="text-sm"
302305
onClick={() => setActiveTab('console')}
303306
disabled={isLoading}
304307
>
305-
<Terminal className="w-4 h-4 mr-1" />
308+
<Terminal className="w-3 h-3 mr-1" />
306309
Console
307310
</Button>
308311
)}
@@ -312,58 +315,51 @@ const ResponsiveToolbar = ({
312315
<div className="flex items-center space-x-2">
313316
<Button
314317
variant="ghost"
318+
size="sm"
315319
className={`p-0 ${compactIcons ? 'hidden' : 'block'}`}
316320
disabled={isLoading}
317321
>
318-
<GitFork className="w-5 h-5" />
319-
</Button>
320-
<Button
321-
variant="ghost"
322-
className={`p-0 ${compactIcons ? 'hidden' : 'block'}`}
323-
disabled={isLoading}
324-
>
325-
<Share2 className="w-5 h-5" />
326-
</Button>
327-
<Button
328-
variant="ghost"
329-
className={`p-0 ${compactIcons ? 'hidden' : 'block'}`}
330-
disabled={isLoading}
331-
>
332-
<Copy className="w-5 h-5" />
322+
<Copy className="w-3 h-3" />
333323
</Button>
334324
</div>
335325
<div className="flex items-center space-x-2">
336326
{!compactIcons && (
337327
<>
328+
{/*
329+
//TODO: FIX ME (ALLEN)
338330
<Button
339331
variant="outline"
332+
size="sm"
340333
className="text-sm"
341334
disabled={isLoading}
342335
>
343336
Supabase
344337
</Button>
345338
<Button
346339
variant="outline"
340+
size="sm"
347341
className="text-sm"
348342
disabled={isLoading}
349343
>
350344
Publish
351-
</Button>
345+
</Button> */}
352346
<Button
353347
variant="outline"
348+
size="sm"
354349
className="text-sm"
355350
disabled={isLoading || !projectId || isDownloading}
356351
onClick={handleDownload}
357352
>
358353
{isDownloading ? (
359-
<Loader className="w-4 h-4 mr-1 animate-spin" />
354+
<Loader className="w-3 h-3 mr-1 animate-spin" />
360355
) : (
361-
<Download className="w-4 h-4 mr-1" />
356+
<Download className="w-3 h-3 mr-1" />
362357
)}
363358
Download
364359
</Button>
365360
<Button
366361
variant={isGithubSyncComplete ? 'secondary' : 'outline'}
362+
size="sm"
367363
className="text-sm"
368364
disabled={
369365
isLoading ||
@@ -374,29 +370,32 @@ const ResponsiveToolbar = ({
374370
onClick={handlePublishToGitHub}
375371
>
376372
{isPublishingToGitHub ? (
377-
<Loader className="w-4 h-4 mr-1 animate-spin" />
373+
<Loader className="w-3 h-3 mr-1 animate-spin" />
378374
) : (
379-
<Github className="w-4 h-4 mr-1" />
375+
<Github className="w-3 h-3 mr-1" />
380376
)}
381377
{isGithubSyncComplete ? 'View on GitHub' : 'GitHub'}
382378
</Button>
383379
</>
384380
)}
385381
{compactIcons && (
386382
<>
383+
{/*
384+
//TODO: FIX ME (ALLEN)
387385
<Button variant="outline" className="p-2" disabled={isLoading}>
388386
<Share2 className="w-4 h-4" />
389-
</Button>
387+
</Button> */}
390388
<Button
391389
variant="outline"
392-
className="p-2"
390+
size="icon"
391+
className="h-8 w-8"
393392
disabled={isLoading || !projectId || isDownloading}
394393
onClick={handleDownload}
395394
>
396395
{isDownloading ? (
397-
<Loader className="w-4 h-4 animate-spin" />
396+
<Loader className="w-3 h-3 animate-spin" />
398397
) : (
399-
<Download className="w-4 h-4" />
398+
<Download className="w-3 h-3" />
400399
)}
401400
</Button>
402401
<Button
@@ -411,9 +410,9 @@ const ResponsiveToolbar = ({
411410
onClick={handlePublishToGitHub}
412411
>
413412
{isPublishingToGitHub ? (
414-
<Loader className="w-4 h-4 animate-spin" />
413+
<Loader className="w-3 h-3 animate-spin" />
415414
) : (
416-
<Github className="w-4 h-4" />
415+
<Github className="w-3 h-3" />
417416
)}
418417
</Button>
419418
</>

0 commit comments

Comments
 (0)