Skip to content

Commit

Permalink
Merge pull request #16 from primus-teoSprint/feat/#6
Browse files Browse the repository at this point in the history
[#6] step2 νŽ˜μ΄μ§€ ui 및 μΆ”κ°€μ„€λͺ… ν† κΈ€μ°½ κ΅¬ν˜„
  • Loading branch information
03hoho03 authored Apr 6, 2024
2 parents 09e3800 + c0e9921 commit 120ae56
Show file tree
Hide file tree
Showing 7 changed files with 217 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.question_icon_container {
display: flex;
position:relative;
justify-content: center;
align-items: center;
}
.question_icon {
color:var(--purple-700);
cursor: pointer;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use client'

import React, { useState } from 'react'
import S from './index.module.css'
import { BsFillQuestionCircleFill } from 'react-icons/bs'
import MoreExplainToggle from '../MoreExplainToggle'

function MoreExplainBtn({ type }: { type: string }) {
const [isHover, setIsHover] = useState(false)

const handleMouseOver = () => {
setIsHover(true)
}
const handleMouseOut = () => {
setIsHover(false)
}

return (
<div className={S.question_icon_container}>
<BsFillQuestionCircleFill
className={S.question_icon}
onMouseOver={handleMouseOver}
onMouseOut={handleMouseOut}
/>
{isHover && <MoreExplainToggle type={type} />}
</div>
)
}

export default MoreExplainBtn
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.toggle_container {
position:absolute;
width: 240px;
top: 20px;
left:10px;
background-color: white;
z-index: 999;
border: 1px solid #c9c9c9;
border-radius: 4px;
padding: 8px;
}
.toggle_container > p {
font-size: 10px;
width: 100%;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from 'react'
import S from './index.module.css'

interface MoreExplainToggleProps {
type: string
}

function MoreExplainToggle({ type }: MoreExplainToggleProps) {
return (
<div className={S.toggle_container}>
{type === 'marketResponse' && (
<p>
아이디어: λ„·ν”Œλ¦­μŠ€(초기 DVD 기반 λͺ¨λΈ)
<br />
<br />
μ‹œμž₯ν˜Έμ‘κ°€μ„€: 우편 배솑 기반의 DVD λŒ€μ—¬ μ„œλΉ„μŠ€λ₯Ό μ›”μ •μ•‘ μš”κΈˆμ œ, λ°˜λ‚©
지연 κ³Όνƒœλ£Œ 무료 μ •μ±…κ³Ό κ²°ν•©ν•˜μ—¬ λ§Žμ€ μ‚¬λžŒλ“€μ΄ λΉ„λ””μ˜€ κ°€κ²Œλ₯Ό μ΄μš©ν•˜λŠ”
λŒ€μ‹  우리 μ„œλΉ„μŠ€μ— κ°€μž…ν•  것이닀.
<br />
<br />
이와같이 μ‹œμž₯이 우리의 μ œν’ˆμ΄λ‚˜ μ„œλΉ„μŠ€λ₯Ό μ–΄λ–»κ²Œ 받아듀이지에 λŒ€ν•΄
μ •ν™•ν•œ μ •μ˜λ₯Ό 내리고, ν•΄λ‹Ή μ‹œμž₯ μˆ˜μš”κ°€ μ‘΄μž¬ν•œλ‹€λŠ” 증거λ₯Ό μ°Ύμ•„λ‚΄λŠ” 것이
μ‹œμž₯ν˜Έμ‘κ°€μ„€μ΄ ν•΄μ•Ό ν•  μΌμ΄μ—μš”.
</p>
)}
{type === 'XYZ' && (
<p>
XλŠ” ν‘œμ μ‹œμž₯의 λͺ‡ νΌμ„ΌνŠΈλ₯Ό 차지할 수 μžˆμ„μ§€, YλŠ” μ–΄λ–€ ν‘œμ μ‹œμž₯에 λŒ€ν•œ,
ZλŠ” ν‘œμ  μ‹œμž₯이 μ œν’ˆμ— λŒ€ν•΄ μ–΄λ–€ λ°©μ‹μœΌλ‘œ μ–΄λŠ λ²”μœ„κΉŒμ§€ ν˜Έμ‘ ν•  까λ₯Ό
μ˜λ―Έν•΄μš”
<br />
<br />
예제: 적어도 10%의 λŒ€κΈ°μ§ˆ μ§€μˆ˜κ°€ 100 이상인 λ„μ‹œμ— μ‚¬λŠ” μ‚¬λžŒλ“€μ€
120λ‹¬λŸ¬ 짜리 νœ΄λŒ€μš© μ˜€μ—Ό 탐지기λ₯Ό ꡬ맀할 것이닀.
</p>
)}
</div>
)
}

export default MoreExplainToggle
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.main_container {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.step_info {
color: #FFFFFF;
margin: 24px;
margin-bottom: 32px;
}
.step_info > h3 {
padding: 12px 0;
font-weight: 500;
font-size: 24px;
}
.step_info > p {
font-size: 24px;
}
.survey_container {
background-color: #FFFFFF;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
padding: 12px;
}
.input_container {
margin-bottom: 8px;
}
.input_title_container {
display: flex;
align-items: center;
}
.input_title_container > .input_title {
font-size: 16px;
padding:12px 0;
margin-right: 8px;
}
.input_container > .input_explain {
font-size: 12px;
margin-bottom: 8px;
}
.direction_btns {
display: flex;
align-items: center;
justify-content: center;
}
.direction_btns > a {
margin: 0 8px;
}
.prev_btn {
background-color: #FFFFFF;
padding: 12px 20px;
font-size: 14px;
font-weight: bold;
border: 1px solid #DCDCDC;
border-radius: 8px;
}
.next_btn {
background-color: var(--purple-700);
color: #FFFFFF;
padding: 12px 20px;
font-size: 14px;
font-weight: bold;
border-radius: 8px;
}
49 changes: 48 additions & 1 deletion app/(route)/verification/ibulsin/_components/Step2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,56 @@

import React from 'react'
import S from './index.module.css'
import Link from 'next/link'
import Textarea from '../Textarea'
import MoreExplainBtn from '../MoreExplainBtn'

function Step2() {
return <div className={S.main}>hello</div>
return (
<div className={S.main_container}>
<div className={S.step_info}>
<h3 className={S.step}>STEP 2</h3>
<p className={S.step_explain}>
μ‹œμž₯ν˜Έμ‘κ°€μ„€κ³Ό XYZ가섀을
<br />
μ„Έμ›Œλ³΄μ•„μš”.
</p>
</div>
<div className={S.survey_container}>
<div className={S.input_container}>
<div className={S.input_title_container}>
<h3 className={S.input_title}>μ‹œμž₯ν˜Έμ‘ κ°€μ„€</h3>
<MoreExplainBtn type={'marketResponse'} />
</div>
<p className={S.input_explain}>
μ‹œμž₯ν˜Έμ‘κ°€μ„€(Market Engagement Hypothesis)μ΄λž€ μ‹œμž₯이 우리의
아이디어λ₯Ό μ–΄λ–»κ²Œ 받아듀일지에 λŒ€ν•œ 우리의 핡심 μ‹ λ…μ΄λ‚˜ 가정을
μ–˜κΈ°ν•΄μš”.
</p>
<Textarea fieldKey={'marketResponse'} />
</div>
<div className={S.input_container}>
<div className={S.input_title_container}>
<h3 className={S.input_title}>XYZ κ°€μ„€</h3>
<MoreExplainBtn type={'XYZ'} />
</div>
<p className={S.input_explain}>
적어도 XνΌμ„ΌνŠΈμ˜ YλŠ” Z ν•  것이닀 λΌλŠ” ν˜•νƒœμ˜ κ°€μ„€μ΄μ—μš”. μ‹œμž₯ν˜Έμ‘
가섀을 λ°”νƒ•μœΌλ‘œ 숫자둜 μΉ˜ν™˜μ— μ’€ 더 μΉ˜λ°€ν•˜κ²Œ ν•˜λŠ” λ„κ΅¬μ˜ˆμš”
</p>
<Textarea fieldKey={'XYZ'} />
</div>
<div className={S.direction_btns}>
<Link className={S.prev_btn} href={'/verification/ibulsin?step=1'}>
이전 단계
</Link>
<Link className={S.next_btn} href={'/verification/ibulsin?step=3'}>
λ‹€μŒ 단계
</Link>
</div>
</div>
</div>
)
}

export default Step2
10 changes: 9 additions & 1 deletion app/(route)/verification/ibulsin/_components/Textarea/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import cn from 'classnames'
import { useForm } from 'react-hook-form'

interface TextAreaProps {
fieldKey: 'outline' | 'why'
fieldKey: 'outline' | 'why' | 'marketResponse' | 'XYZ'
}

function Textarea({ fieldKey }: TextAreaProps) {
Expand All @@ -29,6 +29,14 @@ function Textarea({ fieldKey }: TextAreaProps) {
register: whyField,
MaxLength: 500,
},
marketResponse: {
register: whyField,
MaxLength: 500,
},
XYZ: {
register: whyField,
MaxLength: 500,
},
}

const countCharacters = () => {
Expand Down

0 comments on commit 120ae56

Please sign in to comment.