fix: Update AccordionTrigger content to display "Open" when not disabled

This commit is contained in:
anovazzi1 2024-06-14 18:17:40 -03:00
commit 0cc2d1efc9

View file

@ -34,19 +34,19 @@ const AccordionTrigger = React.forwardRef<
<div
className={cn(
"flex flex-1 cursor-pointer items-center justify-between py-4 text-sm font-medium transition-all [&[data-state=open]>svg]:rotate-180",
className
className,
)}
>
{children}
<ShadTooltip
styleClasses="z-50"
content={disabled ? "Empty" : ""}
content={disabled ? "Empty" : "Open"}
side="top"
>
<ChevronDownIcon
className={cn(
"h-4 w-4 font-bold transition-transform duration-200",
disabled ? "text-muted-foreground" : "text-primary"
disabled ? "text-muted-foreground" : "text-primary",
)}
/>
</ShadTooltip>
@ -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}
>