From 348e285a8bce7e825db77c1f9f4c06eb860afdb9 Mon Sep 17 00:00:00 2001 From: RachelJ0426 <137344614+RachelJ0426@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:24:16 -0400 Subject: [PATCH] add a dropdown list functional --- app/page.tsx | 4 +++- components/dropdown.tsx | 30 +++++++++++++++++++++++ components/select.tsx | 28 ++++++++++++++++++++++ lib/data.ts | 53 ++++++++++++++++------------------------- 4 files changed, 81 insertions(+), 34 deletions(-) create mode 100644 components/dropdown.tsx create mode 100644 components/select.tsx diff --git a/app/page.tsx b/app/page.tsx index 63955de3..7c0a135c 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -3,18 +3,20 @@ import Contact from "@/components/contact"; import Experience from "@/components/experience"; import Intro from "@/components/intro"; import Projects from "@/components/projects"; +import Dropdown from "@/components/dropdown"; import SectionDivider from "@/components/section-divider"; import Skills from "@/components/skills"; export default function Home() { return ( -
+
+
); diff --git a/components/dropdown.tsx b/components/dropdown.tsx new file mode 100644 index 00000000..9f8b4a77 --- /dev/null +++ b/components/dropdown.tsx @@ -0,0 +1,30 @@ +"use client"; + +import React from "react"; +import SectionHeading from "./section-heading"; +import Select from "./select"; + +export default function Dropdown() { + const [isHidden, setIsHidden] = React.useState(false); + const [selectedItem, setSelectedItem] = React.useState(""); + + const handleSelectItem = () => { + setIsHidden(false); + }; + + return ( +