File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
apps/client/src/components/modal Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ import { useModalContext } from '@/features/modal' ;
2+
3+ import Button from '@/components/Button' ;
4+
5+ interface DeleteConfirmModalProps {
6+ onCancel ?: ( ) => void ;
7+ onConfirm ?: ( ) => void ;
8+ }
9+
10+ function DeleteConfirmModal ( { onCancel, onConfirm } : DeleteConfirmModalProps ) {
11+ const { closeModal } = useModalContext ( ) ;
12+
13+ return (
14+ < div className = 'inline-flex flex-col items-center justify-center gap-2.5 rounded-lg bg-gray-50 p-8 shadow' >
15+ < div className = 'flex h-[8dvh] min-w-[20dvw] flex-col justify-center gap-2' >
16+ < div className = 'w-full text-center font-bold' >
17+ < span > 정말 삭제하시겠습니까?</ span >
18+ </ div >
19+ < div className = 'mx-auto mt-4 inline-flex w-full items-start justify-center gap-2.5' >
20+ < Button
21+ className = 'w-full bg-gray-500'
22+ onClick = { ( ) => {
23+ onCancel ?.( ) ;
24+ closeModal ( ) ;
25+ } }
26+ >
27+ < span className = 'flex-grow text-sm font-medium text-white' >
28+ 취소하기
29+ </ span >
30+ </ Button >
31+ < Button
32+ className = 'w-full bg-indigo-600 transition-colors duration-200'
33+ onClick = { ( ) => {
34+ onConfirm ?.( ) ;
35+ closeModal ( ) ;
36+ } }
37+ >
38+ < span className = 'flex-grow text-sm font-medium text-white' >
39+ 삭제하기
40+ </ span >
41+ </ Button >
42+ </ div >
43+ </ div >
44+ </ div >
45+ ) ;
46+ }
47+
48+ export default DeleteConfirmModal ;
You can’t perform that action at this time.
0 commit comments