-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskills.tsx
52 lines (47 loc) · 1.23 KB
/
skills.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
"use client";
import React from "react";
import { motion } from "framer-motion";
import SectionHeading from "./section-heading";
import { skillsData } from "@/lib/data";
import { useSectionInView } from "@/lib/hooks";
const fadeInAnimationVariants = {
initial: {
opacity: 0,
y: 100,
},
animate: (index: number) => ({
opacity: 1,
y: 0,
transition: {
delay: 0.05 * index,
},
}),
};
const Skills: React.FC = () => {
const { ref } = useSectionInView("Skills");
return (
<section
id="skills"
ref={ref}
className="mb-28 max-w-[53rem] scroll-mt-28 text-center sm:mb-40"
>
<SectionHeading>My skills</SectionHeading>
<ul className="flex flex-wrap justify-center gap-2 text-lg text-gray-800">
{skillsData.map((skill, index) => (
<motion.li
className="bg-white borderBlack rounded-xl px-5 py-3 dark:bg-white/10 dark:text-white/80"
key={skill}
variants={fadeInAnimationVariants}
initial="initial"
whileInView="animate"
viewport={{ once: true }}
custom={index}
>
{skill}
</motion.li>
))}
</ul>
</section>
);
};
export default Skills;