From 05f0fc5d368a58201dbb5638f0cfdb50d2bc6bf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20der=20Winden?= Date: Mon, 14 Oct 2024 16:33:29 +0200 Subject: [PATCH] Removed lines when hovering --- apps/admin-x-design-system/src/global/ListItem.tsx | 2 +- apps/admin-x-design-system/src/global/TableRow.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/admin-x-design-system/src/global/ListItem.tsx b/apps/admin-x-design-system/src/global/ListItem.tsx index d13ec45cce..d5b4cb17e8 100644 --- a/apps/admin-x-design-system/src/global/ListItem.tsx +++ b/apps/admin-x-design-system/src/global/ListItem.tsx @@ -47,7 +47,7 @@ const ListItem: React.FC = ({ separator ? 'border-b border-grey-100 last-of-type:border-b-transparent dark:border-grey-900' : 'border-y border-transparent', onClick && 'cursor-pointer before:absolute before:inset-0 before:content-[""]', 'hover:z-10 hover:border-b-transparent', - '-mb-px pb-px', // Negative margin to overlap borders + '-mb-px pb-px', className ); diff --git a/apps/admin-x-design-system/src/global/TableRow.tsx b/apps/admin-x-design-system/src/global/TableRow.tsx index a360ed4881..35bb54112e 100644 --- a/apps/admin-x-design-system/src/global/TableRow.tsx +++ b/apps/admin-x-design-system/src/global/TableRow.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import React, {forwardRef} from 'react'; -export const tableRowHoverBgClasses = 'before:absolute before:inset-x-[-16px] before:top-0 before:bottom-0 before:bg-grey-50 before:opacity-0 hover:before:opacity-100 before:rounded-md before:transition-opacity dark:before:bg-grey-950'; +export const tableRowHoverBgClasses = 'before:absolute before:inset-x-[-16px] before:top-[-1px] before:bottom-0 before:bg-grey-50 before:opacity-0 hover:before:opacity-100 before:rounded-md before:transition-opacity dark:before:bg-grey-950 hover:z-10'; export interface TableRowProps { id?: string; @@ -32,6 +32,7 @@ const TableRow = forwardRef(function TableRo bgOnHover && tableRowHoverBgClasses, onClick && 'cursor-pointer', separator ? 'border-b border-grey-100 last-of-type:border-b-transparent dark:border-grey-950' : 'border-y border-none first-of-type:hover:border-t-transparent', + 'hover:border-b-transparent', className ); @@ -41,7 +42,7 @@ const TableRow = forwardRef(function TableRo
{children}
{action && -
+
{action}
}