Skip to content

Commit 50cea84

Browse files
committed
style: improve button styling consistency across UI
1 parent e6b6547 commit 50cea84

2 files changed

Lines changed: 27 additions & 23 deletions

File tree

src/components/editor/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,13 +837,13 @@ export default function Index({
837837
variant="outline"
838838
size="sm"
839839
onClick={() => setShowAttachments(!showAttachments)}
840-
className={
840+
className={`shadow-none ${
841841
showAttachments
842842
? 'bg-accent text-accent-foreground'
843843
: note.attachments && note.attachments.length > 0
844844
? 'text-primary'
845845
: 'text-muted-foreground'
846-
}
846+
}`}
847847
title={
848848
showAttachments ? 'Hide attachments' : 'Show attachments'
849849
}

src/components/notes/NotesPanel/index.tsx

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
} from 'lucide-react';
1212
import NotesList from '@/components/notes/NotesPanel/NotesList.tsx';
1313
import { Button } from '@/components/ui/button.tsx';
14+
import { ButtonGroup } from '@/components/ui/button-group';
1415
import {
1516
DropdownMenu,
1617
DropdownMenuContent,
@@ -237,6 +238,7 @@ export default function FilesPanel({
237238
variant="outline"
238239
size="icon"
239240
onClick={onToggleFolderPanel}
241+
className="shadow-none"
240242
title={
241243
isFolderPanelOpen ? 'Hide folder panel' : 'Show folder panel'
242244
}
@@ -266,23 +268,24 @@ export default function FilesPanel({
266268
</div>
267269

268270
<div className="flex shrink-0 items-center gap-2">
269-
<DropdownMenu>
270-
<DropdownMenuTrigger asChild>
271-
<Button
272-
variant="outline"
273-
size="sm"
274-
className={`flex items-center justify-center ${isMobile ? 'h-9 w-9 touch-manipulation p-0' : 'h-6 w-6 p-0'}`}
275-
title={getFilterLabel()}
276-
>
277-
{hasActiveFilters ? (
278-
<FilterX
279-
className={`${isMobile ? 'h-3 w-3' : 'h-2 w-2'} text-primary`}
280-
/>
281-
) : (
282-
<Filter className={isMobile ? 'h-3 w-3' : 'h-2 w-2'} />
283-
)}
284-
</Button>
285-
</DropdownMenuTrigger>
271+
<ButtonGroup>
272+
<DropdownMenu>
273+
<DropdownMenuTrigger asChild>
274+
<Button
275+
variant="outline"
276+
size="sm"
277+
className={`shadow-none flex items-center justify-center ${isMobile ? 'h-9 w-9 touch-manipulation p-0' : ''}`}
278+
title={getFilterLabel()}
279+
>
280+
{hasActiveFilters ? (
281+
<FilterX
282+
className={`${isMobile ? 'h-3 w-3' : 'h-4 w-4'} text-primary`}
283+
/>
284+
) : (
285+
<Filter className={isMobile ? 'h-3 w-3' : 'h-4 w-4'} />
286+
)}
287+
</Button>
288+
</DropdownMenuTrigger>
286289
<DropdownMenuContent align="end" className="w-52" sideOffset={8}>
287290
<div className="text-muted-foreground px-2 py-1.5 text-xs font-medium">
288291
FILTER
@@ -410,18 +413,18 @@ export default function FilesPanel({
410413
<Button
411414
variant="outline"
412415
size="sm"
413-
className={`flex items-center justify-center gap-1 ${isMobile ? 'h-9 touch-manipulation px-3' : 'h-6 px-2'}`}
416+
className={`shadow-none flex items-center justify-center gap-1 ${isMobile ? 'h-9 touch-manipulation px-3' : ''}`}
414417
title="Create new note from template"
415418
disabled={creatingNote}
416419
>
417420
{creatingNote ? (
418421
<div
419-
className={`${isMobile ? 'h-4 w-4' : 'h-3 w-3'} animate-spin rounded-full border-2 border-current border-t-transparent`}
422+
className={`${isMobile ? 'h-4 w-4' : 'h-4 w-4'} animate-spin rounded-full border-2 border-current border-t-transparent`}
420423
/>
421424
) : (
422425
<>
423-
<Plus className={isMobile ? 'h-4 w-4' : 'h-3 w-3'} />
424-
{!isMobile && <ChevronDown className="h-2 w-2" />}
426+
<Plus className={isMobile ? 'h-4 w-4' : 'h-4 w-4'} />
427+
{!isMobile && <ChevronDown className="h-3 w-3" />}
425428
</>
426429
)}
427430
</Button>
@@ -648,6 +651,7 @@ export default function FilesPanel({
648651
</DropdownMenuContent>
649652
</DropdownMenu>
650653
)}
654+
</ButtonGroup>
651655
</div>
652656
</div>
653657

0 commit comments

Comments
 (0)