From d3609791f2c0cf6aa090a4565630d98b7f10f3b1 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 18 Apr 2024 15:55:37 -0700 Subject: [PATCH 1/3] a small bit of className cleanup --- app/pages/project/vpcs/VpcPage/tabs/VpcSubnetsTab.tsx | 2 +- app/ui/lib/Table.tsx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/pages/project/vpcs/VpcPage/tabs/VpcSubnetsTab.tsx b/app/pages/project/vpcs/VpcPage/tabs/VpcSubnetsTab.tsx index 16f721ce0d..896c62cddc 100644 --- a/app/pages/project/vpcs/VpcPage/tabs/VpcSubnetsTab.tsx +++ b/app/pages/project/vpcs/VpcPage/tabs/VpcSubnetsTab.tsx @@ -83,7 +83,7 @@ export const VpcSubnetsTab = () => { {creating && setCreating(false)} />} {editing && setEditing(null)} />} - +
) } diff --git a/app/ui/lib/Table.tsx b/app/ui/lib/Table.tsx index 3bfeb018b5..a7145f4870 100644 --- a/app/ui/lib/Table.tsx +++ b/app/ui/lib/Table.tsx @@ -100,14 +100,13 @@ Table.Cell = ({ height = 'small', className, children, ...props }: TableCellProp - ) -} + {children} + + +) /** * Used _outside_ of the `Table`, this element wraps buttons that sit on top From 429ccc17bcd9f60a1f1f0e466f652e58adfaa337 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Fri, 19 Apr 2024 09:07:43 -0700 Subject: [PATCH 3/3] increase row height on sled instances table as well --- app/pages/system/inventory/sled/SledInstancesTab.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/pages/system/inventory/sled/SledInstancesTab.tsx b/app/pages/system/inventory/sled/SledInstancesTab.tsx index 29ff8eb0dc..4af4856f1c 100644 --- a/app/pages/system/inventory/sled/SledInstancesTab.tsx +++ b/app/pages/system/inventory/sled/SledInstancesTab.tsx @@ -78,5 +78,5 @@ export function SledInstancesTab() { const columns = useColsWithActions(staticCols, makeActions) - return
From 2a0373037b4559f6ecdefd4a1113aa8e7a6746e5 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 18 Apr 2024 16:00:51 -0700 Subject: [PATCH 2/3] no need to declare const --- app/ui/lib/Table.tsx | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/app/ui/lib/Table.tsx b/app/ui/lib/Table.tsx index a7145f4870..f72097b37b 100644 --- a/app/ui/lib/Table.tsx +++ b/app/ui/lib/Table.tsx @@ -94,27 +94,24 @@ Table.Body = ({ className, children, ...props }: TableBodyProps) => { } export type TableCellProps = JSX.IntrinsicElements['td'] & { height?: 'small' | 'large' } -Table.Cell = ({ height = 'small', className, children, ...props }: TableCellProps) => { - const heightClasses = { 'h-12': height === 'small', 'h-16': height === 'large' } - return ( -
( + +
-
- {children} -
-
} /> + return
} rowHeight="large" /> }