Skip to content

Commit bcc4e15

Browse files
ovflowdbenhalverson
authored andcommitted
fix(motion): accessibility and initial status fixes
1 parent f7b6499 commit bcc4e15

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/components/Layout/index.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'prismjs/plugins/line-numbers/prism-line-numbers.css';
22
import 'prismjs/themes/prism-okaidia.css';
33
import React from 'react';
4+
import { MotionConfig } from 'framer-motion';
45
import Header from '../Header';
56
import Footer from '../Footer';
67
import '../../styles/tokens.scss';
@@ -34,11 +35,13 @@ const Layout = ({
3435
location={location}
3536
img={img}
3637
/>
37-
<div className="layout-container">
38-
<Header />
39-
{children}
40-
{showFooter && <Footer />}
41-
</div>
38+
<MotionConfig reducedMotion="user">
39+
<div className="layout-container">
40+
<Header />
41+
{children}
42+
{showFooter && <Footer />}
43+
</div>
44+
</MotionConfig>
4245
</>
4346
);
4447
};

src/components/SearchBar/SearchInput.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ const SearchInput = ({ localSearchLearnPages }: SearchProps): JSX.Element => {
7474
<motion.div
7575
className="searchBarContainer"
7676
animate={isExpanded ? 'expanded' : 'collapsed'}
77+
initial="collapsed"
7778
variants={containerVariants}
7879
transition={containerTransition}
7980
ref={parentRef}

0 commit comments

Comments
 (0)