@@ -9,10 +9,57 @@ Also various BootstrapVue components have props with default variants and text c
9
9
10
10
### Default BootstrapVue configuration
11
11
12
- <pre class =" hljs js text-monospace p-2 " >
12
+ Default breakpoint names are stored in the ` breakpoints ` property, while component defaults are keyed
13
+ by their <samp >PascaleCase</samp > name with the props as <samp >camelCase</samp > properties. Only
14
+ properties defined in the default configuration can be overridden.
15
+
16
+ <pre class =" hljs json text-monospace p-2 " >
13
17
{{ defaultConfig }}
14
18
</pre >
15
19
20
+ ### Supplying new configuration values
21
+
22
+ When you ` Vue.use(BootstrapVue) ` , you can optionally pass a configuration object which specifies
23
+ new values to replace teh default values. For example if you wish to define new breakpoint names
24
+ (which will generate appropriate properties on components such as ` <b-col> ` and ` <b-form-group> ` ):
25
+
26
+ ``` js
27
+ import BootstrapVue from ' bootstrap-vue'
28
+ Vue .use (BootstrapVue, {
29
+ breakpoints: [` xs` , ' sm' , ' md' , ' lg' , ' xl' , ' xxl' ]
30
+ })
31
+ ```
32
+
33
+ Or if changin the default variants for ` <b-button> ` and ` <b-alert> ` :
34
+
35
+ ``` js
36
+ import BootstrapVue from ' bootstrap-vue'
37
+ Vue .use (BootstrapVue, {
38
+ BAlert: { variant: ' danger' },
39
+ BButton: { variant: ' primary' }
40
+ })
41
+ ```
42
+
43
+ The values provided as the config option to ` Vue.use ` will be merged with the default values.
44
+
45
+ ### Supplying config for individual component plugin imports
46
+
47
+ WHen importing individual component plugins, you can specify a config as well (using the same
48
+ config structure as above. YOu only need to provide configuration to the first component you
49
+ import, but each successive config will be merged with the previous config provided.
50
+
51
+ Note breakppint names should only be defined before using any compoponents (as they are required
52
+ to generate component breakpoint specific props).
53
+
54
+ ``` js
55
+ import Layout from ' bootstrap-vue/es/components/layout'
56
+ import Alert from ' bootstrap-vue/es/components/alert'
57
+ import Button from ' bootstrap-vue/es/components/button'
58
+ Vue .use (Layout, { breakpoints: [' xs' , ' sm' , ' lg' , ' xl' , ' xxl' ] })
59
+ Vue .use (Alert, { BAlert: { variant: ' danger' } })
60
+ Vue .use (Button, { BButton: { variant: ' primary' } })
61
+ ```
62
+
16
63
## Disabling BootstrapVue console warnings
17
64
18
65
BootstrapVue will warn (via ` console.warn ` ) when you try and use a depreated prop, or pass
0 commit comments