|
3 | 3 | v-if="isOpen" |
4 | 4 | class="fixed inset-0 bg-black bg-opacity-15 flex justify-center items-center z-50" |
5 | 5 | @click.self="closeModal"> |
6 | | - <div class="bg-white rounded-lg shadow-lg px-8 py-8 min-w-[364px]"> |
7 | | - <div class="mb-2 min-h-16"> |
8 | | - <div |
9 | | - v-if="type == 'successType'" |
10 | | - class="flex ic justify-center"> |
11 | | - <CommonIcons :name="successIcon" /> |
12 | | - </div> |
13 | | - <div |
14 | | - v-if="type == 'failType' || type == 'inputType'" |
15 | | - class="flex ic justify-center"> |
16 | | - <CommonIcons :name="failIcon" /> |
17 | | - </div> |
18 | | - <div |
19 | | - v-if="type == 'warningType'" |
20 | | - class="flex ic justify-center"> |
21 | | - <CommonIcons :name="warningIcon" /> |
22 | | - </div> |
23 | | - </div> |
| 6 | + <div class="bg-white rounded-lg shadow-lg px-8 py-8"> |
| 7 | + <div class="flex flex-col gap-8 w-[300px]"> |
| 8 | + <div class="flex flex-col gap-6"> |
| 9 | + <div class="flex flex-col items-center gap-2"> |
| 10 | + <CommonIcons |
| 11 | + v-if="type == 'successType'" |
| 12 | + :name="successIcon" /> |
| 13 | + <CommonIcons |
| 14 | + v-if="type == 'failType' || type == 'inputType'" |
| 15 | + :name="failIcon" /> |
| 16 | + <CommonIcons |
| 17 | + v-if="type == 'warningType'" |
| 18 | + :name="warningIcon" /> |
24 | 19 |
|
25 | | - <div> |
26 | | - <div class="flex text-2xl font-bold justify-center mb-2"> |
27 | | - <slot name="header"></slot> |
28 | | - </div> |
29 | | - <div |
30 | | - v-if="type != 'inputType'" |
31 | | - class="flex text-sm font-bold text-body justify-center"> |
32 | | - <slot name="body"></slot> |
| 20 | + <div class="flex text-2xl font-bold justify-center"> |
| 21 | + <slot name="header"></slot> |
| 22 | + </div> |
| 23 | + |
| 24 | + <div |
| 25 | + v-if="type != 'inputType'" |
| 26 | + class="flex text-sm font-bold text-body justify-center"> |
| 27 | + <slot name="body"></slot> |
| 28 | + </div> |
| 29 | + </div> |
| 30 | + |
| 31 | + <textarea |
| 32 | + v-if="type == 'inputType'" |
| 33 | + v-model="textValue" |
| 34 | + placeholder="거부 사유를 입력해주세요" |
| 35 | + class="flex border w-full border-zinc-300 px-4 py-3 focus:outline-none resize-none h-[120px]" /> |
33 | 36 | </div> |
34 | | - </div> |
35 | 37 |
|
36 | | - <textarea |
37 | | - v-if="type == 'inputType'" |
38 | | - v-model="textValue" |
39 | | - placeholder="거부 사유를 입력해주세요" |
40 | | - class="flex border w-full border-zinc-300 px-4 py-3 focus:outline-none resize-none mt-6 h-[120px]" /> |
41 | | - <div class="mt-8"> |
42 | 38 | <button |
43 | 39 | class="button-large-primary" |
44 | 40 | v-if="type == 'successType'" |
|
54 | 50 | </button> |
55 | 51 |
|
56 | 52 | <div |
57 | | - class="flex mt-8 items-center" |
| 53 | + class="flex items-center gap-6" |
58 | 54 | v-if="type == 'warningType' || type == 'inputType'"> |
59 | | - <div class="mr-6"> |
60 | | - <button |
61 | | - class="button-large-default" |
62 | | - @click="closeModal"> |
63 | | - 취소 |
64 | | - </button> |
65 | | - </div> |
66 | | - <div> |
67 | | - <button |
68 | | - class="button-large-red" |
69 | | - @click="closeModal"> |
70 | | - {{ type === 'inputType' ? '거부' : '삭제' }} |
71 | | - </button> |
72 | | - </div> |
| 55 | + <button |
| 56 | + class="button-large-default" |
| 57 | + @click="closeModal"> |
| 58 | + 취소 |
| 59 | + </button> |
| 60 | + <button |
| 61 | + class="button-large-red" |
| 62 | + @click="confirmModal"> |
| 63 | + {{ type === 'inputType' ? '거부' : '삭제' }} |
| 64 | + </button> |
73 | 65 | </div> |
74 | 66 | </div> |
75 | 67 | </div> |
@@ -102,4 +94,8 @@ watch(textValue, newValue => { |
102 | 94 | const closeModal = () => { |
103 | 95 | emit('close') |
104 | 96 | } |
| 97 | +
|
| 98 | +const confirmModal = () => { |
| 99 | + emit('click') |
| 100 | +} |
105 | 101 | </script> |
0 commit comments