-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FE] 약속 생성 확인 모달 복구 develop 브랜치에 적용 (#415)
* feat(MeetingCreationConfirmModal): 약속 생성 확인 모달 구현 * feat(CreateMeetingPage): 퍼널에서 입력된 정보를 모달과 연결하여 약속 생성 정보 확인 기능 추가 * refactor(MeetingCreationConfirmModal): p 태그로 변경
- Loading branch information
1 parent
3120495
commit b70fad0
Showing
3 changed files
with
150 additions
and
26 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...eMeetingPage/components/MeetingCreationConfirmModal/MeetingCreationConfirmModal.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
import theme from '@styles/theme'; | ||
|
||
export const s_descriptionContainer = css` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.8rem; | ||
strong { | ||
${theme.typography.captionBold} | ||
color: ${theme.colors.primary} | ||
} | ||
`; | ||
|
||
export const s_description = css` | ||
${theme.typography.captionMedium} | ||
display: flex; | ||
gap: 0.8rem; | ||
`; | ||
|
||
export const s_availableDateDescription = css` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
`; | ||
|
||
export const s_availableDatesContainer = css` | ||
${theme.typography.captionMedium} | ||
display: grid; | ||
grid-template-columns: 2fr 5fr; | ||
`; |
73 changes: 73 additions & 0 deletions
73
frontend/src/pages/CreateMeetingPage/components/MeetingCreationConfirmModal/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import ConfirmModal from '@components/_common/Modal/ConfirmModal'; | ||
|
||
import groupDates from '@utils/groupDates'; | ||
|
||
import { | ||
s_availableDateDescription, | ||
s_availableDatesContainer, | ||
s_description, | ||
s_descriptionContainer, | ||
} from './MeetingCreationConfirmModal.styles'; | ||
|
||
interface MeetingCreationConfirmModalProps { | ||
isModalOpen: boolean; | ||
onModalClose: () => void; | ||
onModalConfirmButtonClick: () => void; | ||
meetingName: string; | ||
hostName: string; | ||
selectedDates: string[]; | ||
startTime: string; | ||
endTime: string; | ||
isOnlyDaysOptionChecked: boolean; | ||
} | ||
|
||
export default function MeetingCreationConfirmModal({ | ||
isModalOpen, | ||
onModalClose, | ||
onModalConfirmButtonClick, | ||
meetingName, | ||
hostName, | ||
selectedDates, | ||
startTime, | ||
endTime, | ||
isOnlyDaysOptionChecked, | ||
}: MeetingCreationConfirmModalProps) { | ||
return ( | ||
<ConfirmModal | ||
isOpen={isModalOpen} | ||
onClose={onModalClose} | ||
onConfirm={onModalConfirmButtonClick} | ||
position="center" | ||
size="small" | ||
title="입력하신 약속 정보를 확인해주세요." | ||
> | ||
<div css={s_descriptionContainer}> | ||
<p css={s_description}> | ||
<strong>약속명</strong> {meetingName} | ||
</p> | ||
<p css={s_description}> | ||
<strong>주최자</strong> {hostName} | ||
</p> | ||
{!isOnlyDaysOptionChecked && ( | ||
<p css={s_description}> | ||
<strong>약속 시간</strong> {startTime} ~ {endTime} | ||
</p> | ||
)} | ||
<div css={s_availableDateDescription}> | ||
<strong>가능 날짜</strong> | ||
{groupDates(selectedDates).map(([monthYear, dates]) => { | ||
const [year, month] = monthYear.split('-'); | ||
return ( | ||
<div css={s_availableDatesContainer} key={monthYear}> | ||
<h3> | ||
{year}년 {month}월 | ||
</h3> | ||
<p>{dates.join(', ')}</p> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
</ConfirmModal> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters