Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 484ad01

Browse files
authored
Merge pull request #197 from asigloo/new-demo-page-tailwind-style
styles(demo): demo page glam with new tailwind
2 parents 1c2a37b + 7052d70 commit 484ad01

File tree

3 files changed

+57
-39
lines changed

3 files changed

+57
-39
lines changed

dev/typescript/App.vue

+51-35
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,60 @@
11
<template>
2-
<div id="app">
2+
<div id="app" class="bg-gray-100">
33
<div class="page container">
4-
<h1 class="title m-4 text-bg">{{ title }}</h1>
54
<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"
1516
>
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>
3944
</div>
4045
<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>
4258
</div>
4359
</div>
4460
</div>

dev/typescript/styles/base.scss

-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
@apply font-serif font-bold text-gray-800 text-2xl;
1717
}
1818

19-
pre {
20-
@apply bg-gray-900 text-white text-xs p-4 rounded-md;
21-
}
22-
2319
.btn {
2420
@apply font-bold py-2 px-4 rounded;
2521
}

tailwind.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ module.exports = {
66
sans: ['Roboto', '-apple-system', 'BlinkMacSystemFont'],
77
serif: ['Montserrat', 'Georgia', 'Cambria'],
88
},
9+
extend: {
10+
colors: {
11+
marine: '#2B3846',
12+
salmon: '#EC6B5E',
13+
},
14+
},
915
},
1016
variants: {},
1117
plugins: [],

0 commit comments

Comments
 (0)