fix: Update AccordionTrigger content to display "Open" when not disabled
This commit is contained in:
parent
91074d9057
commit
0cc2d1efc9
1 changed files with 4 additions and 4 deletions
|
|
@ -34,19 +34,19 @@ const AccordionTrigger = React.forwardRef<
|
||||||
<div
|
<div
|
||||||
className={cn(
|
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",
|
"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}
|
{children}
|
||||||
<ShadTooltip
|
<ShadTooltip
|
||||||
styleClasses="z-50"
|
styleClasses="z-50"
|
||||||
content={disabled ? "Empty" : ""}
|
content={disabled ? "Empty" : "Open"}
|
||||||
side="top"
|
side="top"
|
||||||
>
|
>
|
||||||
<ChevronDownIcon
|
<ChevronDownIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-4 w-4 font-bold transition-transform duration-200",
|
"h-4 w-4 font-bold transition-transform duration-200",
|
||||||
disabled ? "text-muted-foreground" : "text-primary"
|
disabled ? "text-muted-foreground" : "text-primary",
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
|
|
@ -64,7 +64,7 @@ const AccordionContent = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
||||||
className
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue