From fc9fcf13fc6e4cf82352d9720788afa62b74e9e2 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Fri, 16 Feb 2024 17:15:59 +0100 Subject: [PATCH] fix: fixed lending table widths --- src/components/borrow/Table/Columns/Manage.tsx | 2 +- src/components/common/Table/Row.tsx | 2 +- src/components/common/Table/index.tsx | 1 - src/components/earn/lend/Table/Columns/DepositCap.tsx | 3 +++ src/components/earn/lend/Table/Columns/LendButton.tsx | 3 +++ src/components/earn/lend/Table/Columns/Manage.tsx | 5 ++++- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/borrow/Table/Columns/Manage.tsx b/src/components/borrow/Table/Columns/Manage.tsx index c7112d06..8e5c72c6 100644 --- a/src/components/borrow/Table/Columns/Manage.tsx +++ b/src/components/borrow/Table/Columns/Manage.tsx @@ -48,7 +48,7 @@ export default function Manage(props: Props) { if (!address) return null return ( -
+
) diff --git a/src/components/common/Table/Row.tsx b/src/components/common/Table/Row.tsx index eb45dfb9..0d6b027f 100644 --- a/src/components/common/Table/Row.tsx +++ b/src/components/common/Table/Row.tsx @@ -66,7 +66,7 @@ export default function Row(props: Props) { spacingClassName ?? 'px-3 py-4', type && type !== 'strategies' && isSymbolOrName && 'border-l', type && type !== 'strategies' && getBorderColor(type, cell.row.original as any), - cell.column.columnDef.meta?.className ?? 'w-min', + cell.column.columnDef.meta?.className, )} > {flexRender(cell.column.columnDef.cell, cell.getContext())} diff --git a/src/components/common/Table/index.tsx b/src/components/common/Table/index.tsx index ce9ca248..3a31bed6 100644 --- a/src/components/common/Table/index.tsx +++ b/src/components/common/Table/index.tsx @@ -76,7 +76,6 @@ export default function Table(props: Props) { props.spacingClassName ?? 'px-4 py-3', header.column.getCanSort() && 'hover:cursor-pointer', header.id === 'symbol' || header.id === 'name' ? 'text-left' : 'text-right', - 'w-min', header.column.columnDef.meta?.className, )} > diff --git a/src/components/earn/lend/Table/Columns/DepositCap.tsx b/src/components/earn/lend/Table/Columns/DepositCap.tsx index 1ad1028e..e65f431a 100644 --- a/src/components/earn/lend/Table/Columns/DepositCap.tsx +++ b/src/components/earn/lend/Table/Columns/DepositCap.tsx @@ -10,6 +10,9 @@ export const DEPOSIT_CAP_META = { accessorKey: 'marketDepositCap', header: 'Deposit Cap', id: 'marketDepositCap', + meta: { + className: 'w-50', + }, } export const marketDepositCapSortingFn = ( diff --git a/src/components/earn/lend/Table/Columns/LendButton.tsx b/src/components/earn/lend/Table/Columns/LendButton.tsx index ffe78a75..3ca6e5c7 100644 --- a/src/components/earn/lend/Table/Columns/LendButton.tsx +++ b/src/components/earn/lend/Table/Columns/LendButton.tsx @@ -13,6 +13,9 @@ export const LEND_BUTTON_META = { accessorKey: 'lend', enableSorting: false, header: '', + meta: { + className: 'w-40', + }, } interface Props { diff --git a/src/components/earn/lend/Table/Columns/Manage.tsx b/src/components/earn/lend/Table/Columns/Manage.tsx index 4f031e9f..b210a447 100644 --- a/src/components/earn/lend/Table/Columns/Manage.tsx +++ b/src/components/earn/lend/Table/Columns/Manage.tsx @@ -13,6 +13,9 @@ export const MANAGE_META = { accessorKey: 'manage', enableSorting: false, header: '', + meta: { + className: 'w-40', + }, } interface Props { @@ -75,7 +78,7 @@ export default function Manage(props: Props) { if (!address) return null return ( -
+
)