From 750405290a9594a9adc5ed5d1ecd32a0d7e7cd83 Mon Sep 17 00:00:00 2001 From: Bikash Date: Thu, 7 Mar 2024 16:52:53 +0530 Subject: [PATCH] Added tooltip for list items --- .../components/console-list-components.tsx | 87 +++++++++++++------ .../projects/project-resources-v2.tsx | 3 - 2 files changed, 62 insertions(+), 28 deletions(-) diff --git a/src/apps/console/components/console-list-components.tsx b/src/apps/console/components/console-list-components.tsx index 4ad4575f8..5e239c1b7 100644 --- a/src/apps/console/components/console-list-components.tsx +++ b/src/apps/console/components/console-list-components.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import { ReactNode, forwardRef } from 'react'; import Tooltip from '~/components/atoms/tooltip'; import { cn } from '~/components/utils'; @@ -72,16 +72,37 @@ const ListItem = ({ return (
- {data && ( -
- {data} -
- )} - {subtitle && ( -
- {subtitle} + + {data && ( +
+ {data} +
+ )} + {subtitle && ( +
+ {subtitle} +
+ )} +
+ } + > +
+ {data && ( +
+ {data} +
+ )} + {subtitle && ( +
+ {subtitle} +
+ )}
- )} +
{action}
@@ -106,23 +127,39 @@ const ListTitle = ({
{avatar}
- {title && ( -
- {title}
} - > - {title} - -
- )} + + {title && ( +
+ {title} +
+ )} - {subtitle && ( -
- {subtitle} + {subtitle && ( +
+ {subtitle} +
+ )} +
+ } + > +
+ {title && ( +
+ {title} +
+ )} + + {subtitle && ( +
+ {subtitle} +
+ )}
- )} +
{action} diff --git a/src/apps/console/routes/_main+/$account+/projects/project-resources-v2.tsx b/src/apps/console/routes/_main+/$account+/projects/project-resources-v2.tsx index b9d8dfb3d..7f89efb27 100644 --- a/src/apps/console/routes/_main+/$account+/projects/project-resources-v2.tsx +++ b/src/apps/console/routes/_main+/$account+/projects/project-resources-v2.tsx @@ -3,11 +3,8 @@ import { Link, useOutletContext, useParams } from '@remix-run/react'; import { generateKey, titleCase } from '~/components/utils'; import ConsoleAvatar from '~/console/components/console-avatar'; import { - ListBody, ListItem, ListTitle, - listClass, - listFlex, } from '~/console/components/console-list-components'; import Grid from '~/console/components/grid'; import ListGridView from '~/console/components/list-grid-view';