feat: Add possibility to add additional props for PanelSection (#5172)

This commit is contained in:
Celian-abd 2025-07-03 04:52:49 +02:00 committed by GitHub
parent b0704b88cd
commit c112db13a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,13 +28,14 @@ interface PanelSectionContentProps {
export const PanelSection: React.FC<PanelSectionProps> & {
Header: React.FC<PanelSectionHeaderProps>;
Content: React.FC<PanelSectionContentProps>;
} = ({ children, defaultOpen = true, className }) => {
} = ({ children, defaultOpen = true, className, ...props }) => {
return (
<Accordion
type="single"
collapsible
defaultValue={defaultOpen ? 'item' : undefined}
className={cn('flex-shrink-0 overflow-hidden', className)}
{...props}
>
<AccordionItem
value="item"