From d76018a5304a8d3bbeaf358e3fb5fc30c9067224 Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Tue, 4 Feb 2025 15:39:44 +0000 Subject: [PATCH] fix: style table component to figma design (#16417) Update the table styling to match the figma designs Figma: https://www.figma.com/design/WfqIgsTFXN2BscBSSyXWF8/Coder-kit?node-id=1581-8756&m=dev Screenshot 2025-02-04 at 12 40 28 --- site/src/components/Table/Table.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/site/src/components/Table/Table.tsx b/site/src/components/Table/Table.tsx index 85318d3b60..8daf0b57f9 100644 --- a/site/src/components/Table/Table.tsx +++ b/site/src/components/Table/Table.tsx @@ -10,11 +10,11 @@ export const Table = React.forwardRef< HTMLTableElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( -
+
>(({ className, ...props }, ref) => ( - + )); export const TableBody = React.forwardRef< @@ -35,7 +35,13 @@ export const TableBody = React.forwardRef< >(({ className, ...props }, ref) => ( tr:first-child>td]:border-t [&>tr>td:first-child]:border-l", + "[&>tr:last-child>td]:border-b [&>tr>td:last-child]:border-r", + "[&>tr:first-child>td:first-child]:rounded-tl-md [&>tr:first-child>td:last-child]:rounded-tr-md", + "[&>tr:last-child>td:first-child]:rounded-bl-md [&>tr:last-child>td:last-child]:rounded-br-md", + className, + )} {...props} /> )); @@ -91,6 +97,7 @@ export const TableCell = React.forwardRef<
[role=checkbox]]:translate-y-[2px]", className, )}