-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
Stalearea: wwwdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Im trying to extends the props of the accordion component and I'm having some truble getting it done.
For example I would like to have a prop where I can pass a boolean to define where the accordion has borders or not. Something like this
const AccordionItem = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
>(({ className, ...props }, ref) => (
<AccordionPrimitive.Item
ref={ref}
className={classNames(
props.hasBorder ? "border-b border-b-slate-200" : "",
className
)}
{...props}
/>
));
But I've been trying to extend the props but I having trubble finding a way to do that. Any help?
Metadata
Metadata
Assignees
Labels
Stalearea: wwwdocumentationImprovements or additions to documentationImprovements or additions to documentation