-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
184fe38
commit 90fbe65
Showing
15 changed files
with
485 additions
and
133 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import AddWord from 'components/pages/AddWord'; | ||
import ListCard from 'components/pages/ListCard'; | ||
import React from 'react'; | ||
import { Route, Routes, useLocation } from 'react-router-dom'; | ||
import { AnimatePresence } from 'framer-motion'; | ||
// import { AnimatePresence } from 'framer-motion/dist/framer-motion'; | ||
|
||
function AnimateRoutes() { | ||
const location = useLocation(); | ||
return ( | ||
<AnimatePresence> | ||
<Routes location={location} key={location.pathname}> | ||
<Route path="/" element={<AddWord />} /> | ||
<Route path="/cards" element={<ListCard />} /> | ||
</Routes> | ||
</AnimatePresence> | ||
); | ||
} | ||
|
||
export default AnimateRoutes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './AnimateRoutes'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.container { | ||
position: relative; | ||
} | ||
|
||
.page { | ||
position: absolute; | ||
/* left: 15px; */ | ||
/* right: 15px; */ | ||
} | ||
|
||
.page-enter { | ||
opacity: 0; | ||
transform: scale(1.1); | ||
} | ||
|
||
.page-enter-active { | ||
opacity: 1; | ||
transform: scale(1); | ||
transition: opacity 300ms, transform 300ms; | ||
} | ||
|
||
.page-exit { | ||
opacity: 1; | ||
transform: scale(1); | ||
} | ||
|
||
.page-exit-active { | ||
opacity: 0; | ||
transform: scale(0.9); | ||
transition: opacity 300ms, transform 300ms; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.