diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx new file mode 100644 index 0000000..788e972 --- /dev/null +++ b/src/components/Navigation.tsx @@ -0,0 +1,11 @@ +const Navigation = () => { + return ( + <> +
+

Snowgent

+
+ + ); +}; + +export default Navigation; diff --git a/src/components/onboarding/FormButton.tsx b/src/components/onboarding/FormButton.tsx new file mode 100644 index 0000000..615735e --- /dev/null +++ b/src/components/onboarding/FormButton.tsx @@ -0,0 +1,39 @@ +const FormButton = ({ type, onClick }: { type: string; onClick: () => void }) => { + const buttonStyle = + 'bg-[#1d4ed8] w-full text-white py-3 rounded-lg text-center font-medium cursor-pointer'; + + const grayButtonStyle = + 'bg-gray-300 w-full text-gray-700 py-3 rounded-lg text-center font-medium cursor-pointer'; + + const handleClick = () => { + onClick(); + }; + + switch (type) { + case 'next': + return ( +
+ 다음 +
+ ); + + case 'prev': + return ( +
+ 이전 +
+ ); + + case 'submit': + return ( +
+ 완료 +
+ ); + + default: + break; + } +}; + +export default FormButton; diff --git a/src/components/onboarding/MultiSelect.tsx b/src/components/onboarding/MultiSelect.tsx new file mode 100644 index 0000000..eff49e0 --- /dev/null +++ b/src/components/onboarding/MultiSelect.tsx @@ -0,0 +1,12 @@ +const MultiSelect = ({ title }: { title: string }) => { + return ( +
+ {/* 제목 */} +

{title}을 선택하세요

+ {/* 입력칸 */} + +
+ ); +}; + +export default MultiSelect; diff --git a/src/components/onboarding/PriceInput.tsx b/src/components/onboarding/PriceInput.tsx new file mode 100644 index 0000000..ae5dc0d --- /dev/null +++ b/src/components/onboarding/PriceInput.tsx @@ -0,0 +1,32 @@ +import { useState } from 'react'; + +const PriceInput = ({ title, placeholder }: { title: string; placeholder?: string }) => { + const [value, setValue] = useState(''); + + const handleChange = (e: React.ChangeEvent) => { + // 숫자만 입력 가능하도록 + const numericValue = e.target.value.replace(/[^0-9]/g, ''); + setValue(numericValue); + }; + + return ( +
+ {/* 제목 */} +

{title}을 입력해주세요

+ + {/* 입력칸 */} +
+ + 만원 +
+
+ ); +}; + +export default PriceInput; diff --git a/src/components/onboarding/SingleSelect.tsx b/src/components/onboarding/SingleSelect.tsx new file mode 100644 index 0000000..3e45ca0 --- /dev/null +++ b/src/components/onboarding/SingleSelect.tsx @@ -0,0 +1,31 @@ +const defaultOptions = [ + { id: 1, name: 'option1' }, + { id: 2, name: 'option2' }, + { id: 3, name: 'option3' }, + { id: 4, name: 'option4' }, + { id: 5, name: 'option5' }, + { id: 6, name: 'option6' }, + { id: 7, name: 'option7' }, +]; + +const SingleSelect = ({ title }: { title: string }) => { + return ( +
+ {/* 제목 */} +

{title} 선택하세요

+ {/* 단일 선택 버튼 */} + +
+ ); +}; + +export default SingleSelect; diff --git a/src/components/onboarding/TextInput.tsx b/src/components/onboarding/TextInput.tsx new file mode 100644 index 0000000..6ef140b --- /dev/null +++ b/src/components/onboarding/TextInput.tsx @@ -0,0 +1,16 @@ +const TextInput = ({ title, placeholder }: { title: string; placeholder?: string }) => { + return ( +
+ {/* 제목 */} +

{title} 입력해주세요

+ {/* 입력칸 */} + +
+ ); +}; + +export default TextInput; diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 3b7c740..e79c14a 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -6,7 +6,7 @@ const HomePage = () => { return (
Vite logo -

Snowgent

+

Snowgent