Skip to content

Commit

Permalink
correctly wrap the children into animate-height
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 committed Sep 27, 2021
1 parent 41a1fd4 commit 9f1f2eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/components/manage/Blocks/Accordion/AccordionEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ export default (props) => {
<span>{panel?.title}</span>
)}
</Accordion.Title>
<Accordion.Content active={isExclusive(index)}>
<AnimateHeight
animateOpacity
duration={500}
height={isExclusive(index) ? 'auto' : 0}
>
<AnimateHeight
animateOpacity
duration={500}
height={isExclusive(index) ? 'auto' : 0}
>
<Accordion.Content active={isExclusive(index)}>
{children}
</AnimateHeight>
</Accordion.Content>
</Accordion.Content>
</AnimateHeight>
</React.Fragment>
</Accordion>
);
Expand Down
16 changes: 8 additions & 8 deletions src/components/manage/Blocks/Accordion/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ const View = (props) => {
)}
<span>{panel?.title}</span>
</Accordion.Title>
<Accordion.Content active={isExclusive(index)}>
<AnimateHeight
animateOpacity
duration={500}
height={isExclusive(index) ? 'auto' : 0}
>
<AnimateHeight
animateOpacity
duration={500}
height={isExclusive(index) ? 'auto' : 0}
>
<Accordion.Content active={isExclusive(index)}>
<RenderBlocks
{...props}
metadata={metadata}
content={panel}
/>
</AnimateHeight>
</Accordion.Content>
</Accordion.Content>
</AnimateHeight>
</React.Fragment>
</Accordion>
) : null;
Expand Down

0 comments on commit 9f1f2eb

Please sign in to comment.