Skip to content

Commit 64fd700

Browse files
authored
Merge pull request #254 from ttiimmothy/feat/ui
feat add hide button in project section
2 parents 4bc8f1c + 757fe5a commit 64fd700

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

src/components/sections/ProjectsSection.tsx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import projects from "@/constants/projects.json";
33
import { motion } from "framer-motion";
44
import { fadeIn, textVariant, staggerContainer } from "@/components/utils/motions";
55
import { styles as utilStyles } from "@/components/utils/styles";
6-
import { IoIosArrowDown } from "react-icons/io";
6+
import { IoIosArrowUp, IoIosArrowDown } from "react-icons/io";
77
import { useState } from "react";
88
import ProjectCard from "../ProjectCard";
99

@@ -40,7 +40,30 @@ const ProjectsSection: React.FC = () => {
4040
/>
4141
))}
4242
</motion.div>
43-
{!showMoreProjects && (
43+
{showMoreProjects ?
44+
(
45+
<motion.div
46+
className="w-full flex flex-col items-center pt-10 cursor-pointer"
47+
onClick={() => {
48+
setShowMoreProjects(false);
49+
}}
50+
variants={fadeIn("", "", 1.1, 1)}
51+
>
52+
<motion.div
53+
animate={{ y: [0, -20], opacity: [1, 0] }}
54+
transition={{
55+
ease: "easeIn",
56+
repeat: Infinity,
57+
duration: 1,
58+
repeatDelay: 0.5,
59+
}}
60+
>
61+
<IoIosArrowUp size={30} />
62+
</motion.div>
63+
<div>hide</div>
64+
</motion.div>
65+
)
66+
: (
4467
<motion.div
4568
className="w-full flex flex-col items-center pt-10 cursor-pointer"
4669
onClick={() => {

0 commit comments

Comments
 (0)