-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexperience.tsx
58 lines (55 loc) · 1.99 KB
/
experience.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
53
54
55
56
57
58
"use client";
import React from "react";
import SectionHeading from "./section-heading";
import {
VerticalTimeline,
VerticalTimelineElement,
} from "react-vertical-timeline-component";
import "react-vertical-timeline-component/style.min.css";
import { experiencesData } from "@/lib/data";
import { useSectionInView } from "@/lib/hooks";
import { useTheme } from "@/context/theme-context";
export default function Experience() {
const { ref } = useSectionInView("Experience");
const { theme } = useTheme();
return (
<section id="experience" ref={ref} className="scroll-mt-28 mb-28 sm:mb-40">
<SectionHeading>My experience</SectionHeading>
<VerticalTimeline lineColor="">
{experiencesData.map((item, index) => (
<React.Fragment key={index}>
<VerticalTimelineElement
contentStyle={{
background:
theme === "light" ? "#f3f4f6" : "rgba(255, 255, 255, 0.05)",
boxShadow: "none",
border: "1px solid rgba(0, 0, 0, 0.05)",
textAlign: "left",
padding: "1.3rem 2rem",
}}
contentArrowStyle={{
borderRight:
theme === "light"
? "0.4rem solid #9ca3af"
: "0.4rem solid rgba(255, 255, 255, 0.5)",
}}
date={item.date}
icon={item.icon}
iconStyle={{
background:
theme === "light" ? "white" : "rgba(255, 255, 255, 0.15)",
fontSize: "1.5rem",
}}
>
<h3 className="font-semibold capitalize">{item.title}</h3>
<p className="font-normal !mt-0">{item.location}</p>
<p className="!mt-1 !font-normal text-gray-700 dark:text-white/75">
{item.description}
</p>
</VerticalTimelineElement>
</React.Fragment>
))}
</VerticalTimeline>
</section>
);
}