|
1 | 1 | <template>
|
2 |
| - <div id="app"> |
| 2 | + <div id="app" class="bg-gray-100"> |
3 | 3 | <div class="page container">
|
4 |
| - <h1 class="title m-4 text-bg">{{ title }}</h1> |
5 | 4 | <div class="flex flex-wrap justify-between">
|
6 |
| - <div class="card p-6 w-full sm:w-1/2"> |
7 |
| - <dynamic-form |
8 |
| - :form="form" |
9 |
| - @submited="handleSubmit" |
10 |
| - @change="valueChanged" |
11 |
| - @error="handleError" |
12 |
| - > |
13 |
| - <template |
14 |
| - v-slot:customField1="{ control, onChange, onFocus, onBlur }" |
| 5 | + <div class="w-full sm:w-1/2 relative m-6"> |
| 6 | + <div |
| 7 | + class="absolute inset-0 bg-gradient-to-r from-blue-400 to-green-200 shadow-xl transform -skew-y-3 sm:skew-y-0 sm:-rotate-3 sm:rounded-3xl" |
| 8 | + ></div> |
| 9 | + <div class="relative card p-6 bg-white"> |
| 10 | + <h1 class="title mb-16 text-bg">{{ title }}</h1> |
| 11 | + <dynamic-form |
| 12 | + :form="form" |
| 13 | + @submited="handleSubmit" |
| 14 | + @change="valueChanged" |
| 15 | + @error="handleError" |
15 | 16 | >
|
16 |
| - <div class="avocado-field"> |
17 |
| - <input |
18 |
| - :id="control.name" |
19 |
| - v-if="control" |
20 |
| - class="form-control" |
21 |
| - v-model="control.value" |
22 |
| - :type="control.type" |
23 |
| - :name="control.name" |
24 |
| - @change="onChange" |
25 |
| - @focus="onFocus" |
26 |
| - @blur="onBlur" |
27 |
| - /> |
28 |
| - <i>🥑</i> |
29 |
| - </div> |
30 |
| - </template> |
31 |
| - </dynamic-form> |
32 |
| - <button |
33 |
| - class="btn bg-teal-500 text-white hover:bg-teal-700 mt-4" |
34 |
| - submit="true" |
35 |
| - :form="form?.id" |
36 |
| - > |
37 |
| - Submit Form |
38 |
| - </button> |
| 17 | + <template |
| 18 | + v-slot:customField1="{ control, onChange, onFocus, onBlur }" |
| 19 | + > |
| 20 | + <div class="avocado-field"> |
| 21 | + <input |
| 22 | + :id="control.name" |
| 23 | + v-if="control" |
| 24 | + class="form-control" |
| 25 | + v-model="control.value" |
| 26 | + :type="control.type" |
| 27 | + :name="control.name" |
| 28 | + @change="onChange" |
| 29 | + @focus="onFocus" |
| 30 | + @blur="onBlur" |
| 31 | + /> |
| 32 | + <i>🥑</i> |
| 33 | + </div> |
| 34 | + </template> |
| 35 | + </dynamic-form> |
| 36 | + <button |
| 37 | + class="btn bg-teal-500 text-white hover:bg-teal-700 mt-4" |
| 38 | + submit="true" |
| 39 | + :form="form?.id" |
| 40 | + > |
| 41 | + Submit Form |
| 42 | + </button> |
| 43 | + </div> |
39 | 44 | </div>
|
40 | 45 | <div class="p-6 w-full sm:w-1/3">
|
41 |
| - <pre>{{ formValues }}</pre> |
| 46 | + <div |
| 47 | + class="result bg-marine text-white text-xs p-4 rounded-md relative" |
| 48 | + > |
| 49 | + <ul class="absolute top-1 left-2"> |
| 50 | + <li class="rounded w-2 h-2 bg-salmon inline-block mr-1"></li> |
| 51 | + <li class="rounded w-2 h-2 bg-yellow-300 inline-block mr-1"></li> |
| 52 | + <li class="rounded w-2 h-2 bg-green-500 inline-block"></li> |
| 53 | + </ul> |
| 54 | + <pre data-cy="form-values" class="shadow-lg pt-4">{{ |
| 55 | + formValues |
| 56 | + }}</pre> |
| 57 | + </div> |
42 | 58 | </div>
|
43 | 59 | </div>
|
44 | 60 | </div>
|
|
0 commit comments