8000 Enhancement: More settings for BModal · bootstrap-vue/bootstrap-vue@c0b7e7d · GitHub
[go: up one dir, main page]

Skip to content

Commit c0b7e7d

Browse files
committed
Enhancement: More settings for BModal
1 parent d8c7382 commit c0b7e7d

File tree

2 files changed

+52
-30
lines changed

2 files changed

+52
-30
lines changed

src/components/modal/modal.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -55,35 +55,35 @@ export const props = {
5555
},
5656
centered: {
5757
type: Boolean,
58-
default: false
58+
default: () => getComponentConfig(NAME_MODAL, 'centered')
5959
},
6060
scrollable: {
6161
type: Boolean,
62-
default: false
62+
default: () => getComponentConfig(NAME_MODAL, 'scrollable')
6363
},
6464
buttonSize: {
65-
type: String
66-
// default: ''
65+
type: String,
66+
default: () => getComponentConfig(NAME_MODAL, 'buttonSize')
6767
},
6868
noStacking: {
6969
type: Boolean,
70-
default: false
70+
default: () => getComponentConfig(NAME_MODAL, 'noStacking')
7171
},
7272
noFade: {
7373
type: Boolean,
74-
default: false
74+
default: () => getComponentConfig(NAME_MODAL, 'noFade')
7575
},
7676
noCloseOnBackdrop: {
7777
type: Boolean,
78-
default: false
78+
default: () => getComponentConfig(NAME_MODAL, 'noCloseOnBackdrop')
7979
},
8080
noCloseOnEsc: {
8181
type: Boolean,
82-
default: false
82+
default: () => getComponentConfig(NAME_MODAL, 'noCloseOnEsc')
8383
},
8484
noEnforceFocus: {
8585
type: Boolean,
86-
default: false
86+
default: () => getComponentConfig(NAME_MODAL, 'noEnforceFocus')
8787
},
8888
ignoreEnforceFocusSelector: {
8989
type: [Array, String],
@@ -101,8 +101,8 @@ export const props = {
101101
default: () => getComponentConfig(NAME_MODAL, 'titleTag')
102102
},
103103
titleClass: {
104-
type: [String, Array, Object]
105-
// default: null
104+
type: [String, Array, Object],
105+
default: () => getComponentConfig(NAME_MODAL, 'titleClass')
106106
},
107107
titleSrOnly: {
108108
type: Boolean,
@@ -129,8 +129,8 @@ export const props = {
129129
default: () => getComponentConfig(NAME_MODAL, 'headerCloseVariant')
130130
},
131131
headerClass: {
132-
type: [String, Array, Object]
133-
// default: null
132+
type: [String, Array, Object],
133+
default: () => getComponentConfig(NAME_MODAL, 'headerClass')
134134
},
135135
bodyBgVariant: {
136136
type: String,
@@ -141,20 +141,20 @@ export const props = {
141141
default: () => getComponentConfig(NAME_MODAL, 'bodyTextVariant')
142142
},
143143
modalClass: {
144-
type: [String, Array, Object]
145-
// default: null
144+
type: [String, Array, Object],
145+
default: () => getComponentConfig(NAME_MODAL, 'modalClass')
146146
},
147147
dialogClass: {
148-
type: [String, Array, Object]
149-
// default: null
148+
type: [String, Array, Object],
149+
default: () => getComponentConfig(NAME_MODAL, 'dialogClass')
150150
},
151151
contentClass: {
152-
type: [String, Array, Object]
153-
// default: null
152+
type: [String, Array, Object],
153+
default: () => getComponentConfig(NAME_MODAL, 'contentClass')
154154
},
155155
bodyClass: {
156-
type: [String, Array, Object]
157-
// default: null
156+
type: [String, Array, Object],
157+
default: () => getComponentConfig(NAME_MODAL, 'bodyClass')
158158
},
159159
footerBgVariant: {
160160
type: String,
@@ -169,40 +169,40 @@ export const props = {
169169
default: () => getComponentConfig(NAME_MODAL, 'footerTextVariant')
170170
},
171171
footerClass: {
172-
type: [String, Array, Object]
173-
// default: null
172+
type: [String, Array, Object],
173+
default: () => getComponentConfig(NAME_MODAL, 'footerClass')
174174
},
175175
// TODO: Rename to `noHeader` and deprecate `hideHeader`
176176
hideHeader: {
177177
type: Boolean,
178-
default: false
178+
default: () => getComponentConfig(NAME_MODAL, 'hideHeader')
179179
},
180180
// TODO: Rename to `noFooter` and deprecate `hideFooter`
181181
hideFooter: {
182182
type: Boolean,
183-
default: false
183+
default: () => getComponentConfig(NAME_MODAL, 'hideFooter')
184184
},
185185
// TODO: Rename to `noHeaderClose` and deprecate `hideHeaderClose`
186186
hideHeaderClose: {
187187
type: Boolean,
188-
default: false
188+
default: () => getComponentConfig(NAME_MODAL, 'hideHeaderClose')
189189
},
190190
// TODO: Rename to `noBackdrop` and deprecate `hideBackdrop`
191191
hideBackdrop: {
192192
type: Boolean,
193-
default: false
193+
default: () => getComponentConfig(NAME_MODAL, 'hideBackdrop')
194194
},
195195
okOnly: {
196196
type: Boolean,
197-
default: false
197+
default: () => getComponentConfig(NAME_MODAL, 'okOnly')
198198
},
199199
okDisabled: {
200200
type: Boolean,
201-
default: false
201+
default: () => getComponentConfig(NAME_MODAL, 'okDisabled')
202202
},
203203
cancelDisabled: {
204204
type: Boolean,
205-
default: false
205+
default: () => getComponentConfig(NAME_MODAL, 'cancelDisabled')
206206
},
207207
visible: {
208208
type: Boolean,

src/utils/config-defaults.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,37 @@ export default deepFreeze({
243243
[NAME_MODAL]: {
244244
titleTag: 'h5',
245245
size: 'md',
246+
centered: false,
247+
scrollable: false,
248+
buttonSize: undefined,
249+
noStacking: false,
250+
noFade: false,
251+
noCloseOnBackdrop: false,
252+
noCloseOnEsc: false,
253+
noEnforceFocus: false,
254+
titleClass: undefined,
246255
headerBgVariant: undefined,
247256
headerBorderVariant: undefined,
248257
headerTextVariant: undefined,
249258
headerCloseVariant: undefined,
259+
headerClass: undefined,
250260
bodyBgVariant: undefined,
251261
bodyTextVariant: undefined,
262+
modalClass: undefined,
263+
dialogClass: undefined,
264+
contentClass: undefined,
265+
bodyClass: undefined,
252266
footerBgVariant: undefined,
253267
footerBorderVariant: undefined,
254268
footerTextVariant: undefined,
269+
footerClass: undefined,
270+
hideHeader: false,
271+
hideFooter: false,
272+
hideHeaderClose: false,
273+
hideBackdrop: false,
274+
okOnly: false,
275+
okDisabled: false,
276+
cancelDisabled: false,
255277
cancelTitle: 'Cancel',
256278
cancelVariant: 'secondary',
257279
okTitle: 'OK',

0 commit comments

Comments
 (0)
0