diff --git a/src/components/SideBar/SideBar.tsx b/src/components/SideBar/SideBar.tsx
index 91287f1f..a467c50d 100644
--- a/src/components/SideBar/SideBar.tsx
+++ b/src/components/SideBar/SideBar.tsx
@@ -38,6 +38,7 @@ export interface SideBarItemPropsBase {
hidden?: boolean
subItems?: SideBarItemPropsBase[]
badge?: TBadge
+ toolTip?: string
}
export type SidebarDropdownListItem = {
diff --git a/src/components/SideBar/SideBarItem.tsx b/src/components/SideBar/SideBarItem.tsx
index 24bca153..b8652f24 100644
--- a/src/components/SideBar/SideBarItem.tsx
+++ b/src/components/SideBar/SideBarItem.tsx
@@ -94,48 +94,35 @@ const ListSubItems = ({
!isSubSubItem && 'pl-10 ml-4'
)}
>
- {subItemsArray?.map(
- (subItem, index: number) =>
- !subItem.hidden && (
-
-
onToggleMenu(subItem, index)}
- >
- {subItem?.subItems && (
-
- {subItem.isOpen ? (
-
- ) : (
-
- )}
-
- )}
- {subItem?.title?.length > 25 ? (
- {subItem.title}}
- >
-
- {subItem.title}
-
-
- ) : (
+ {subItemsArray?.map((subItem, index: number) => {
+ if (subItem.hidden) return null
+
+ const renderSubItem = () => {
+ return (
+ onToggleMenu(subItem, index)}
+ >
+ {subItem?.subItems && (
+
+ {subItem.isOpen ? (
+
+ ) : (
+
+ )}
+
+ )}
+ {subItem?.title?.length > 25 ? (
+ {subItem.title}}
+ >
{subItem.title}
- )}
- {subItem?.badge && subItem?.badge}
-
- {subItem.subItems && (
-
+
+ ) : (
+
+ {subItem.title}
+
)}
-
+ {subItem?.badge && subItem?.badge}
+
)
- )}
+ }
+ return (
+
+ {subItem.toolTip ? (
+ {renderSubItem()}
+ ) : (
+ renderSubItem()
+ )}
+ {subItem.subItems && (
+
+ )}
+
+ )
+ })}
)
diff --git a/src/components/Tabs/Tab.tsx b/src/components/Tabs/Tab.tsx
index ed5ccb13..1eebd1d8 100644
--- a/src/components/Tabs/Tab.tsx
+++ b/src/components/Tabs/Tab.tsx
@@ -140,7 +140,6 @@ const Tab = forwardRef(
startAdornment={toolTipProps.startAdornment}
position={toolTipProps.position ?? 'right'}
content={toolTipProps.content ?? ''}
- noOpacity={toolTipProps.noOpacity}
>
{renderTab()}
diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx
index 6aef0fef..7887a903 100644
--- a/src/components/Tooltip/Tooltip.tsx
+++ b/src/components/Tooltip/Tooltip.tsx
@@ -37,12 +37,6 @@ export interface TooltipProps {
* primary by default
*/
variant?: TooltipVariant
- /**
- * If true, the tooltip will use a solid color without any opacity.
- * This is useful when you need a fully opaque background or text color.
- * By default, this is set to false, allowing for transparency if defined in the variant styles.
- */
- noOpacity?: boolean
}
const Tooltip: FC = ({
@@ -51,8 +45,7 @@ const Tooltip: FC = ({
endAdornment,
position,
startAdornment,
- variant = 'primary',
- noOpacity = false
+ variant = 'primary'
}) => {
const { isVisible, handleMouseEnter, handleMouseLeave, refs } = useTooltip({
placement: position
@@ -68,9 +61,8 @@ const Tooltip: FC = ({
const colorVariants: { [key: string]: string } = {
primary: composeClasses(
- !noOpacity && 'opacity-70',
fontSize.xs,
- 'p-2 text-white rounded-md text-center bg-gray-900'
+ 'p-2 text-white rounded-md text-center bg-gray-900 opacity-90'
)
}