Skip to content

Commit

Permalink
chore: PR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
timoheddes committed Aug 28, 2023
1 parent 6ab1891 commit 18a809f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/libs/react-ui/src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import React, { useEffect, useState } from 'react';
export interface IAccordionRootProps {
children?: FunctionComponentElement<IAccordionSectionProps>[];
linked?: boolean;
openSection?: number;
initialOpenSection?: number;
}

export const AccordionRoot: FC<IAccordionRootProps> = ({
children,
linked = false,
openSection = undefined,
initialOpenSection = undefined,
}) => {
const [openSections, setOpenSections] = useState([openSection]);
const [openSections, setOpenSections] = useState([initialOpenSection]);

useEffect(() => {
if (linked && openSections.length > 1) {
Expand Down

0 comments on commit 18a809f

Please sign in to comment.