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

Commit 6e2c64e

Browse files
committed
Documentation updated
1 parent 6ba4f7e commit 6e2c64e

File tree

2 files changed

+78
-8
lines changed

2 files changed

+78
-8
lines changed

docs/guide/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ You can select directly the theme trough `dynamicForms` options like this
6868
module.exports = {
6969
modules: ['@asigloo/vue-dynamic-forms/nuxt'],
7070
dynamicForms: {
71-
theme: 'materialize',
71+
theme: 'default',
7272
},
7373
};
7474
```

docs/guide/theming.md

Lines changed: 77 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ The components are unstyled by default, so you can customize them with your own
44
@import '~@asigloo/vue-dynamic-forms/src/styles/themes/theme.scss';
55
```
66

7-
For now, only default theme (similar to bootstrap) is available. More themes are in progress.
8-
7+
More themes are in progress.
98

109
## Defaul Theme
1110

@@ -14,7 +13,18 @@ Similar to default bootstrap theme for forms.
1413
### Import to your app
1514

1615
```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+
};
1828
```
1929

2030
### Customize your variables
@@ -23,7 +33,7 @@ Similar to default bootstrap theme for forms.
2333
$input-bg: #e2eb5d52;
2434
$input-border-color: #aec64c;
2535

26-
@import '~@asigloo/vue-dynamic-forms/src/styles/themes/theme.scss';
36+
@import '~@asigloo/vue-dynamic-forms/src/styles/themes/default.scss';
2737
```
2838

2939
### Variables available
@@ -54,8 +64,8 @@ $input-transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out
5464
$input-placeholder-color: #6c757d !default;
5565
$input-box-shadow: inset 0 1px 1px rgba(#000, 0.075) !default;
5666
$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}
5969
);
6070

6171
$input-focus-bg: $input-bg !default;
@@ -71,4 +81,64 @@ $input-error-color: #dc3545 !default;
7181

7282
## Material Theme
7383

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

Comments
 (0)