Skip to content

Commit 12cb290

Browse files
committed
refactor: update column styles in SandboxEventsTable
- Removed hardcoded column width constants and replaced them with Tailwind CSS classes for improved styling flexibility. - This change enhances the responsiveness and maintainability of the SandboxEventsTable component.
1 parent 7040cb9 commit 12cb290

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

  • src/features/dashboard/sandbox/events

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

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@ import {
1616
} from '@/ui/primitives/table'
1717
import { SandboxEventTypeBadge } from './event-type-badge'
1818

19-
const EVENT_COLUMN_WIDTHS = {
20-
timestamp: 148 + 16,
21-
id: 92 + 16,
22-
} as const
23-
24-
const colStyle = (width: number) => ({
25-
width,
26-
minWidth: width,
27-
maxWidth: width,
28-
})
29-
3019
interface SandboxEventsTableProps {
3120
events: SandboxEventModel[]
3221
isTimestampDescending: boolean
@@ -41,8 +30,8 @@ export const SandboxEventsTable = ({
4130
return (
4231
<Table className="min-w-[360px] table-fixed">
4332
<colgroup>
44-
<col style={colStyle(EVENT_COLUMN_WIDTHS.timestamp)} />
45-
<col style={colStyle(EVENT_COLUMN_WIDTHS.id)} />
33+
<col className="w-[164px]" />
34+
<col className="w-[108px]" />
4635
<col />
4736
</colgroup>
4837
<TableHeader className="bg-bg sticky top-0 z-10">

0 commit comments

Comments
 (0)