@@ -4,8 +4,7 @@ The components are unstyled by default, so you can customize them with your own
4
4
@import ' ~@asigloo/vue-dynamic-forms/src/styles/themes/theme.scss' ;
5
5
```
6
6
7
- For now, only default theme (similar to bootstrap) is available. More themes are in progress.
8
-
7
+ More themes are in progress.
9
8
10
9
## Defaul Theme
11
10
@@ -14,7 +13,18 @@ Similar to default bootstrap theme for forms.
14
13
### Import to your app
15
14
16
15
``` scss
17
- @import ' ~@asigloo/vue-dynamic-forms/src/styles/themes/theme.scss' ;
16
+ @import ' ~@asigloo/vue-dynamic-forms/src/styles/themes/default.scss' ;
17
+ ```
18
+
19
+ or with Nuxt Module options in ` nuxt.config.js ` :
20
+
21
+ ``` javascript [nuxt.config.js]
22
+ module .exports = {
23
+ modules: [' @asigloo/vue-dynamic-forms/nuxt' ],
24
+ dynamicForms: {
25
+ theme: ' default' ,
26
+ },
27
+ };
18
28
```
19
29
20
30
### Customize your variables
@@ -23,7 +33,7 @@ Similar to default bootstrap theme for forms.
23
33
$input-bg : #e2eb5d52 ;
24
34
$input-border-color : #aec64c ;
25
35
26
- @import ' ~@asigloo/vue-dynamic-forms/src/styles/themes/theme .scss' ;
36
+ @import ' ~@asigloo/vue-dynamic-forms/src/styles/themes/default .scss' ;
27
37
```
28
38
29
39
### Variables available
@@ -54,8 +64,8 @@ $input-transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out
54
64
$input-placeholder-color : #6c757d !default ;
55
65
$input-box-shadow : inset 0 1px 1px rgba (#000 , 0.075 ) !default ;
56
66
$input-height : calc (
57
- #{$input-line-height * 1em } + #{$input-padding-y * 2 } + #{ $input-border-width *
58
- 2 }
67
+ #{$input-line-height * 1em } + #{$input-padding-y * 2 } +
68
+ #{ $input-border-width * 2 }
59
69
);
60
70
61
71
$input-focus-bg : $input-bg !default ;
@@ -71,4 +81,64 @@ $input-error-color: #dc3545 !default;
71
81
72
82
## Material Theme
73
83
74
- Work in progress [[ #3 ] ( https://github.com/alvarosaburido/vue-dynamic-forms/issues/3 )]
84
+ ### Import to your app
85
+
86
+ ``` scss
87
+ @import ' ~@asigloo/vue-dynamic-forms/src/styles/themes/material.scss' ;
88
+ ```
89
+
90
+ or with Nuxt Module options in ` nuxt.config.js ` :
91
+
92
+ ``` javascript [nuxt.config.js]
93
+ module .exports = {
94
+ modules: [' @asigloo/vue-dynamic-forms/nuxt' ],
95
+ dynamicForms: {
96
+ theme: ' material' ,
97
+ },
98
+ };
99
+ ```
100
+
101
+ ### Variables available
102
+
103
+ You have all this variables to customize your form inputs.
104
+
105
+ Consider that this variables will affect ** All** your inputs, for more selective styling please use ` customClass ` available on the [ models] ( ./models.md ) .
106
+
107
+ ``` scss
108
+ $theme-color : #6200ee ;
109
+ $base-color : #ced4da ;
110
+ $text-color : #202020 ;
111
+ $light : #fefefe ;
112
+
113
+ $font-size : 1rem !default ;
114
+
115
+ $font-family-sans-serif : -apple-system , BlinkMacSystemFont, ' Segoe UI' , Roboto,
116
+ ' Helvetica Neue' , Arial , ' Noto Sans' , sans-serif , ' Apple Color Emoji' ,
117
+ ' Segoe UI Emoji' , ' Segoe UI Symbol' , ' Noto Color Emoji' !default ;
118
+ $font-family : $font-family-sans-serif !default ;
119
+
120
+ $line-height : 1.5 ;
121
+
122
+ $input-padding-y : 0.375rem ;
123
+ $input-padding-x : 0.75rem ;
124
+ $input-border-width : 1px ;
125
+ $input-border-color : $base-color ;
126
+ $input-border-radius : 0 ;
127
+ $input-transition : border-color 0.15s ease-in-out , box-shadow 0.15s ease-in-out ;
128
+ $input-placeholder-color : #6c757d ;
129
+
130
+ $input-error-color : #dc3545 ;
131
+ ```
132
+
133
+ ### Customize your variables
134
+
135
+ ``` scss
136
+ $theme-color : #6200ee ;
137
+ $base-color : #ced4da ;
138
+
139
+ @import ' ~@asigloo/vue-dynamic-forms/src/styles/themes/material.scss' ;
140
+ ```
141
+
142
+ ## Submit you own theme
143
+
144
+ If you have a great custom theme and you want it to be on the library submit a propose via PR [ here] ( https://github.com/alvarosaburido/vue-dynamic-forms/pulls ) . 👩🎤👨🎤
0 commit comments