11<template >
22 <main class =" field-modal-container" >
3- <div class =" grid-2x2 " >
3+ <div class =" input-container " >
44 <div class =" input-group" >
5- <label class =" field-label" >Field Name: </label >
5+ <label class =" field-label" >Field name </label >
66 <input class =" field-input" v-model =" fieldName" type =" text" />
77 </div >
88
99 <div class =" input-group" >
10- <label class =" field-label" >Type: </label >
10+ <label class =" field-label" >Type</label >
1111 <select class =" field-select" v-model =" type" >
1212 <option disabled value =" " >-- Select type --</option >
1313 <option value =" String" >String</option >
2020 </div >
2121
2222 <div class =" input-group" >
23- <label class =" field-label" >Default Value: </label >
23+ <label class =" field-label" >Default value </label >
2424 <input class =" field-input" v-model =" defaultValue" type =" text" />
2525 </div >
2626
27- <div class =" input-group checkbox-inline" >
28- <label class =" field-label" >Primary Key:</label >
29- <input type =" checkbox" v-model =" isPrimaryKey" />
30- </div >
27+
3128 </div >
3229
3330 <div class =" checkbox-group" >
31+ <label ><input type =" checkbox" v-model =" isPrimaryKey" /> Primary key</label >
3432 <label ><input type =" checkbox" v-model =" isNullable" /> Nullable</label >
3533 <label ><input type =" checkbox" v-model =" isUnique" /> Unique</label >
3634 <label ><input type =" checkbox" v-model =" isIndex" /> Index</label >
3735 </div >
3836
3937 <div class =" action-group" >
40- <button class =" delete-field-btn" @click =" deleteField" >Delete</button >
4138 <button class =" save-field-btn" @click =" saveField" >Save</button >
39+ <button class =" delete-field-btn" @click =" deleteField" >Delete</button >
4240 </div >
4341 </main >
4442</template >
@@ -89,77 +87,59 @@ const deleteField = () => {
8987 display : flex ;
9088 flex-direction : column ;
9189 gap : 1rem ;
92- border : 2px solid black ;
9390 padding : 1rem ;
94- box-shadow : 4px 4px 0px black ;
95- background-color : #fff ;
91+ background-color : #ffdb58 ;
9692}
9793
98- .grid-2x2 {
99- display : grid ;
100- grid-template-columns : 1 fr 1 fr ;
94+ .input-container {
95+ display : flex ;
96+ flex-direction : column ;
10197 gap : 1rem ;
10298}
10399
104100.input-group {
105101 display : flex ;
106102 flex-direction : column ;
103+ gap : 0.15rem ;
107104}
108105
109- .checkbox-inline {
110- flex-direction : row ;
111- align-items : center ;
112- gap : 0.5rem ;
113- }
106+
114107
115108.field-label {
116109 font-weight : bold ;
117- margin-bottom : 0.25 rem ;
110+ margin-bottom : 5 px ;
118111}
119112
120113.field-input ,
121114.field-select {
122115 border : 2px solid black ;
123- border-radius : 4px ;
124- padding : 0.5rem ;
125- box-shadow : 3px 3px 0px black ;
126- background-color : #f4f4f0 ;
127- transition :
128- transform 0.1s ease-in-out ,
129- box-shadow 0.1s ease-in-out ;
130- }
131-
132- .field-input :focus ,
133- .field-select :focus {
134- outline : none ;
135- transform : translate (2px , 2px );
136- box-shadow : none ;
116+ border-radius : 6px ;
117+ padding : 0.6rem ;
118+ background-color : white ;
137119}
138120
139121.checkbox-group {
140122 display : flex ;
141- justify-content : space-between ;
142- gap : 1 rem ;
123+ flex-direction : column ;
124+ gap : 0.5 rem ;
143125 font-weight : bold ;
144126}
145127
146128.action-group {
129+ gap : 0.5rem ;
130+ margin-top : 2rem ;
147131 display : flex ;
148- justify-content : space-between ;
149- gap : 1rem ;
132+ flex-direction : column ;
150133}
151134
152135.delete-field-btn {
153- align-self : flex-end ;
136+ width : 100 % ;
154137 padding : 0.5rem 1rem ;
155138 border : 2px solid black ;
156139 border-radius : 4px ;
157- font-weight : bold ;
158140 background-color : #ff6b6b ;
159141 box-shadow : 3px 3px 0px black ;
160- transition :
161- transform 0.1s ease-in-out ,
162- box-shadow 0.1s ease-in-out ;
142+ transition : transform 0.1s ease-in-out , box-shadow 0.1s ease-in-out ;
163143}
164144
165145.delete-field-btn :hover {
@@ -169,16 +149,13 @@ const deleteField = () => {
169149}
170150
171151.save-field-btn {
172- align-self : flex-end ;
152+ width : 100 % ;
173153 padding : 0.5rem 1rem ;
174154 border : 2px solid black ;
175155 border-radius : 4px ;
176- font-weight : bold ;
177156 background-color : #2fff2f ;
178157 box-shadow : 3px 3px 0px black ;
179- transition :
180- transform 0.1s ease-in-out ,
181- box-shadow 0.1s ease-in-out ;
158+ transition : transform 0.1s ease-in-out , box-shadow 0.1s ease-in-out ;
182159}
183160
184161.save-field-btn :hover {
0 commit comments