https://dev.kronoz.win/r/marzneshin.git
| 1 |
4056c66 |
Dawsh |
1y ago |
import * as React from "react"; |
| 2 |
4056c66 |
Dawsh |
1y ago |
import * as AccordionPrimitive from "@radix-ui/react-accordion"; |
| 3 |
4056c66 |
Dawsh |
1y ago |
import { cn } from "@marzneshin/common/utils"; |
| 4 |
4056c66 |
Dawsh |
1y ago |
import { ChevronDown } from "lucide-react"; |
| 5 |
4056c66 |
Dawsh |
1y ago |
|
| 6 |
4056c66 |
Dawsh |
1y ago |
export const AccordionTrigger = React.forwardRef< |
| 7 |
4056c66 |
Dawsh |
1y ago |
React.ElementRef<typeof AccordionPrimitive.Trigger>, |
| 8 |
4056c66 |
Dawsh |
1y ago |
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> |
| 9 |
4056c66 |
Dawsh |
1y ago |
>(({ className, children, ...props }, ref) => ( |
| 10 |
4056c66 |
Dawsh |
1y ago |
<AccordionPrimitive.Header className="flex"> |
| 11 |
4056c66 |
Dawsh |
1y ago |
<AccordionPrimitive.Trigger |
| 12 |
4056c66 |
Dawsh |
1y ago |
ref={ref} |
| 13 |
4056c66 |
Dawsh |
1y ago |
className={cn( |
| 14 |
4056c66 |
Dawsh |
1y ago |
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", |
| 15 |
4056c66 |
Dawsh |
1y ago |
className |
| 16 |
4056c66 |
Dawsh |
1y ago |
)} |
| 17 |
4056c66 |
Dawsh |
1y ago |
{...props} |
| 18 |
4056c66 |
Dawsh |
1y ago |
> |
| 19 |
4056c66 |
Dawsh |
1y ago |
{children} |
| 20 |
4056c66 |
Dawsh |
1y ago |
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" /> |
| 21 |
4056c66 |
Dawsh |
1y ago |
</AccordionPrimitive.Trigger> |
| 22 |
4056c66 |
Dawsh |
1y ago |
</AccordionPrimitive.Header> |
| 23 |
4056c66 |
Dawsh |
1y ago |
)) |