From 55fdebe3bb0df09c56e6a045e49cec83030c7b70 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Fri, 14 Jun 2024 18:19:13 -0300 Subject: [PATCH] Fixed ShadTooltip appearing when Accordion is not disabled --- .../src/components/shadTooltipComponent/index.tsx | 4 +++- src/frontend/src/components/ui/accordion.tsx | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/components/shadTooltipComponent/index.tsx b/src/frontend/src/components/shadTooltipComponent/index.tsx index 51254cf68..1b76ab325 100644 --- a/src/frontend/src/components/shadTooltipComponent/index.tsx +++ b/src/frontend/src/components/shadTooltipComponent/index.tsx @@ -10,7 +10,7 @@ export default function ShadTooltip({ styleClasses, delayDuration = 500, }: ShadToolTipType): JSX.Element { - return ( + return content ? ( {children} + ) : ( + <>{children} ); } diff --git a/src/frontend/src/components/ui/accordion.tsx b/src/frontend/src/components/ui/accordion.tsx index 403b07996..8ca360d6c 100644 --- a/src/frontend/src/components/ui/accordion.tsx +++ b/src/frontend/src/components/ui/accordion.tsx @@ -34,19 +34,19 @@ const AccordionTrigger = React.forwardRef<
svg]:rotate-180", - className + className, )} > {children} @@ -64,7 +64,7 @@ const AccordionContent = React.forwardRef< ref={ref} className={cn( "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm", - className + className, )} {...props} >