diff --git a/libs/shared/ui/src/cuHacking/components/accordion/accordion.tsx b/libs/shared/ui/src/cuHacking/components/accordion/accordion.tsx new file mode 100644 index 00000000..618d8195 --- /dev/null +++ b/libs/shared/ui/src/cuHacking/components/accordion/accordion.tsx @@ -0,0 +1,56 @@ +import * as AccordionPrimitive from '@radix-ui/react-accordion' +import { cn } from '@shadcn/lib/utils' +import { ChevronDown } from 'lucide-react' + +import * as React from 'react' + +const Accordion = AccordionPrimitive.Root + +const AccordionItem = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +AccordionItem.displayName = 'AccordionItem' + +const AccordionTrigger = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + svg]:rotate-180 gap-3 text-left', + className, + )} + {...props} + > + + {children} + + +)) +AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName + +const AccordionContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + +
{children}
+
+)) + +AccordionContent.displayName = AccordionPrimitive.Content.displayName + +export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } diff --git a/libs/shared/ui/src/cuHacking/components/accordion/index.ts b/libs/shared/ui/src/cuHacking/components/accordion/index.ts new file mode 100644 index 00000000..28bcc74b --- /dev/null +++ b/libs/shared/ui/src/cuHacking/components/accordion/index.ts @@ -0,0 +1 @@ +export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './accordion'