forked from codebucks27/react-sidebar
-
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
9d31af5
commit e862f71
Showing
12 changed files
with
20,287 additions
and
59 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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,9 @@ | ||
import MotionHoc from "./MotionHoc"; | ||
|
||
const CalenderComponent = () => { | ||
return <h1>Calender</h1>; | ||
}; | ||
|
||
const Calender = MotionHoc(CalenderComponent); | ||
|
||
export default Calender; |
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,9 @@ | ||
import MotionHoc from "./MotionHoc"; | ||
|
||
const DocumentsComponent = () => { | ||
return <h1>Documents</h1>; | ||
}; | ||
|
||
const Documents = MotionHoc(DocumentsComponent); | ||
|
||
export default Documents; |
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,9 @@ | ||
import MotionHoc from "./MotionHoc"; | ||
|
||
const HomeComponent = () => { | ||
return <h1>Home</h1>; | ||
}; | ||
|
||
const Home = MotionHoc(HomeComponent); | ||
|
||
export default Home; |
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,25 @@ | ||
//higher order component to add same functionality to each page | ||
|
||
import { motion } from "framer-motion"; | ||
|
||
const MotionHoc = (Component) => { | ||
return function HOC() { | ||
return ( | ||
<motion.div | ||
initial={{ y: 500 }} | ||
animate={{ | ||
y: 0, | ||
transition: { duration: 0.5, type: "spring" }, | ||
}} | ||
exit={{ | ||
y: -500, | ||
transition: { duration: 0.5, type: "spring", ease: "easeInOut" }, | ||
}} | ||
> | ||
<Component /> | ||
</motion.div> | ||
); | ||
}; | ||
}; | ||
|
||
export default MotionHoc; |
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,9 @@ | ||
import MotionHoc from "./MotionHoc"; | ||
|
||
const ProjectsComponent = () => { | ||
return <h1>Projects</h1>; | ||
}; | ||
|
||
const Projects = MotionHoc(ProjectsComponent); | ||
|
||
export default Projects; |
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,9 @@ | ||
import MotionHoc from "./MotionHoc"; | ||
|
||
const TeamComponent = () => { | ||
return <h1>Team</h1>; | ||
}; | ||
|
||
const Team = MotionHoc(TeamComponent); | ||
|
||
export default Team; |
Oops, something went wrong.