fix: SectionAccordion animation misbehave
This commit is contained in:
@@ -55,10 +55,5 @@ describe('SectionAccordion', () => {
|
||||
render(<SectionAccordion {...activeProps} />);
|
||||
expect(screen.queryByRole('link')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('content wrapper has section-content class', () => {
|
||||
const { container } = render(<SectionAccordion {...activeProps} />);
|
||||
expect(container.querySelector('.section-content')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -39,13 +39,13 @@ export function SectionAccordion({ number, title, id, isActive, href, children }
|
||||
<section id={id} className="scroll-mt-8">
|
||||
{isActive ? (
|
||||
<div className="mb-6 sm:mb-12">
|
||||
<ViewTransitionWrapper name="section-content">
|
||||
<div className="mb-6 sm:mb-16">
|
||||
<ViewTransitionWrapper name="section-title">
|
||||
<div className="mb-6 sm:mb-12">
|
||||
<h1 className="font-heading font-black text-xl sm:text-section-title leading-[1.2] mb-0">{heading}</h1>
|
||||
</div>
|
||||
</ViewTransitionWrapper>
|
||||
<ViewTransitionWrapper name="section-body">
|
||||
<div className="section-content">{children}</div>
|
||||
<div>{children}</div>
|
||||
</ViewTransitionWrapper>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user