From 72767d6b95280d5a1e9f2e9632683a59f37c4aff Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Mon, 1 Jul 2024 21:31:41 +0900 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20=ED=94=84=EB=A1=9C=EA=B7=B8=EB=9E=A8?= =?UTF-8?q?=20=EB=93=B1=EB=A1=9D=EC=8B=9C=20=ED=83=9C=EA=B7=B8=20Dropdown?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/challenge/ChallengeInput.tsx | 23 ++++++++++++++---- package.json | 1 + pages/_app.tsx | 1 + styles/dropdown.css | 31 +++++++++++++++++++++++++ yarn.lock | 20 ++++++++++++++++ 5 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 styles/dropdown.css diff --git a/components/challenge/ChallengeInput.tsx b/components/challenge/ChallengeInput.tsx index b4abce2..2592b19 100644 --- a/components/challenge/ChallengeInput.tsx +++ b/components/challenge/ChallengeInput.tsx @@ -1,10 +1,15 @@ import FlexBox from "../Flexbox"; import TextInput, { TextInputProps } from "../Input"; import TextArea from "../TextArea"; +import Dropdown from "react-dropdown"; +import "react-dropdown/style.css"; + +const locationOptions = ["서울", "경기", "그 외"]; +const typeOptions = ["학술", "운동", "예술", "기타"]; interface ChallengeInputProps extends TextInputProps { title: string; - inputType: "text" | "calendar" | "textarea"; + inputType: "text" | "calendar" | "textarea" | "dropdown"; value2?: string; setValue2?: React.Dispatch>; } @@ -42,16 +47,24 @@ export default function ChallengeInput({ isError={false} type="date" /> - ~ + ~ ); break; + case "dropdown": + return ( + + + + + ); + break; default: return (