Skip to content

Commit

Permalink
fix: change type for children prop in the Accordian component (#707)
Browse files Browse the repository at this point in the history
The component was getting a Typescript error when used with only a single child, so
the type needed to be updated to allow for for both single and multiple children
  • Loading branch information
seialkali authored Apr 25, 2022
1 parent a3f93a8 commit 59e7796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/accordion/components/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface AccordionProps extends AccordionBaseProps {
* An array of open accordion panel IDs
*/
initialExpandedItems?: string[];
children: React.ReactNode[];
children: React.ReactNode | React.ReactNode[];
}

const Accordion = ({
Expand Down

0 comments on commit 59e7796

Please sign in to comment.