Skip to content

Commit f7b502c

Browse files
committed
refactor: replace button with Button component in SandboxEventsTable
- Updated the timestamp sorting button to use the new Button component for consistency in styling and improved accessibility. - Adjusted class names to align with the new component's design specifications, enhancing the overall appearance of the table header. This change aims to standardize UI components across the dashboard for better maintainability.
1 parent 12cb290 commit f7b502c

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

  • src/features/dashboard/sandbox/events

src/features/dashboard/sandbox/events/table.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { SandboxEventModel } from '@/core/modules/sandboxes/models'
44
import { IdBadge } from '@/features/dashboard/shared'
55
import { formatLocalLogStyleTimestamp } from '@/lib/utils/formatting'
66
import CopyButtonInline from '@/ui/copy-button-inline'
7+
import { Button } from '@/ui/primitives/button'
78
import { ArrowDownIcon, HistoryIcon } from '@/ui/primitives/icons'
89
import {
910
Table,
@@ -37,18 +38,20 @@ export const SandboxEventsTable = ({
3738
<TableHeader className="bg-bg sticky top-0 z-10">
3839
<TableRow>
3940
<TableHead className="px-0 h-min text-fg" data-state="selected">
40-
<button
41+
<Button
4142
type="button"
42-
className="inline-flex items-center gap-1"
43+
variant="quaternary"
44+
size="none"
45+
className="prose-label-highlight text-fg uppercase [&_svg]:size-3 [&_svg]:text-fg"
4346
onClick={onToggleTimestampSort}
4447
>
45-
TIMESTAMP
48+
Timestamp
4649
<ArrowDownIcon
4750
className={
4851
isTimestampDescending ? 'size-3' : 'size-3 rotate-180'
4952
}
5053
/>
51-
</button>
54+
</Button>
5255
</TableHead>
5356
<TableHead className="px-0">ID</TableHead>
5457
<TableHead className="px-0">Event</TableHead>

0 commit comments

Comments
 (0)