diff --git a/src/components/Modal/domain/AddTodoList.module.css b/src/components/Modal/domain/AddTodoList.module.css new file mode 100644 index 0000000..5d1d989 --- /dev/null +++ b/src/components/Modal/domain/AddTodoList.module.css @@ -0,0 +1,113 @@ +.container { + --dialog-max-width-mobile: 375px; + --dialog-padding: 16px 16px 32px; + --dialog-gap: 10px; + --control-height: 48px; + --close-button-size: 24px; + --input-max-width: 288px; + --button-max-width: 280px; + + display: flex; + padding: var(--dialog-padding); + flex-direction: column; + gap: var(--dialog-gap); + align-items: stretch; + box-sizing: border-box; +} + +.header { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; +} + +.title { + color: var(--Text-Primary, #1e293b); + font-family: Pretendard; + font-size: 16px; + font-style: normal; + font-weight: 500; + line-height: 19px; + margin: 0; +} + +.form { + display: flex; + flex-direction: column; + gap: 24px; +} + +.input.input { + padding: 14px 16px; + width: 100%; + max-width: var(--input-max-width); + height: var(--control-height); + box-sizing: border-box; + align-self: center; + text-align: center; +} + +.input.input::placeholder { + color: var(--Text-Default, #64748b); + font-family: Pretendard; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 19px; +} + +.footer { + display: flex; + justify-content: center; +} + +.button { + display: flex; + width: 100%; + max-width: var(--button-max-width); + height: var(--control-height); + justify-content: center; + align-items: center; + gap: 10px; + flex-shrink: 0; + border-radius: 12px; + background: var(--Color-Brand-Primary, #5189fa); + border: none; + color: var(--color-text-inverse, #ffffff); + text-align: center; + font-family: Pretendard; + font-size: 16px; + font-style: normal; + font-weight: 600; + line-height: 19px; +} + +.closeButton { + width: var(--close-button-size); + height: var(--close-button-size); + padding: 0; + border: none; + background: transparent; + display: inline-flex; + align-items: center; + justify-content: center; + cursor: pointer; +} + +.modalContent.modalContent { + --dialog-radius-desktop: 24px; + --dialog-radius-mobile: 24px 24px 0 0; + border-radius: var(--dialog-radius-desktop); +} + +@media (max-width: 480px) { + .container { + width: 100%; + max-width: var(--dialog-max-width-mobile); + } + + .modalContent.modalContent { + border-radius: var(--dialog-radius-mobile); + } +} diff --git a/src/components/Modal/domain/AddTodoList.tsx b/src/components/Modal/domain/AddTodoList.tsx new file mode 100644 index 0000000..99ed38a --- /dev/null +++ b/src/components/Modal/domain/AddTodoList.tsx @@ -0,0 +1,52 @@ +'use client'; + +import Image from 'next/image'; +import type { FormEvent } from 'react'; +import { Input } from '@/components/input'; +import Modal from '../Modal'; +import styles from './AddTodoList.module.css'; +import xMarkBig from '@/assets/icons/xMark/xMarkBig.svg'; + +const TITLE_ID = 'add-todo-list-title'; + +export interface AddTodoListProps { + isOpen: boolean; + onClose: () => void; + onCreate: () => void; +} + +export default function AddTodoList({ isOpen, onClose, onCreate }: AddTodoListProps) { + const handleSubmit = (e: FormEvent) => { + e.preventDefault(); + onCreate(); + }; + + return ( + +
+
+

+ 할 일 목록 +

+ +
+ +
+ + +
+
+
+ ); +} diff --git a/src/components/Modal/types/types.ts b/src/components/Modal/types/types.ts index 6c53d07..98b4c1c 100644 --- a/src/components/Modal/types/types.ts +++ b/src/components/Modal/types/types.ts @@ -6,6 +6,7 @@ interface BaseModalProps { children?: ReactNode; ariaDescribedby?: string; className?: string; + contentClassName?: string; closeOnOverlayClick?: boolean; closeOnEscape?: boolean; }