feat: Add possibility to add additional props for PanelSection (#5172)
This commit is contained in:
parent
b0704b88cd
commit
c112db13a8
@ -28,13 +28,14 @@ interface PanelSectionContentProps {
|
|||||||
export const PanelSection: React.FC<PanelSectionProps> & {
|
export const PanelSection: React.FC<PanelSectionProps> & {
|
||||||
Header: React.FC<PanelSectionHeaderProps>;
|
Header: React.FC<PanelSectionHeaderProps>;
|
||||||
Content: React.FC<PanelSectionContentProps>;
|
Content: React.FC<PanelSectionContentProps>;
|
||||||
} = ({ children, defaultOpen = true, className }) => {
|
} = ({ children, defaultOpen = true, className, ...props }) => {
|
||||||
return (
|
return (
|
||||||
<Accordion
|
<Accordion
|
||||||
type="single"
|
type="single"
|
||||||
collapsible
|
collapsible
|
||||||
defaultValue={defaultOpen ? 'item' : undefined}
|
defaultValue={defaultOpen ? 'item' : undefined}
|
||||||
className={cn('flex-shrink-0 overflow-hidden', className)}
|
className={cn('flex-shrink-0 overflow-hidden', className)}
|
||||||
|
{...props}
|
||||||
>
|
>
|
||||||
<AccordionItem
|
<AccordionItem
|
||||||
value="item"
|
value="item"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user