File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ methods: {
172
172
```
173
173
174
174
175
- ## Prevent Closing
175
+ ### Prevent Closing
176
176
177
177
To prevent ` <b-modal> ` from closing (for example when validation fails). you can call
178
178
the ` preventDefault() ` method of the event object passed to your ` ok ` (** OK** button),
@@ -407,6 +407,9 @@ export default {
407
407
<!-- modal-variant-1.vue -->
408
408
```
409
409
410
+ You can also apply abritrary classes to the modal header, body and footer via the
411
+ ` header-class ` , ` body-class ` and ` footer-class ` props, respectively. The props
412
+ accept either a string or array of strings.
410
413
411
414
## Lazy loading
412
415
Modal will always render its HTML markup in the document at the location that
Original file line number Diff line number Diff line change @@ -267,6 +267,10 @@ export default {
267
267
type : String ,
268
268
default : null
269
269
} ,
270
+ headerClass : {
271
+ type : [ String , Array ] ,
272
+ default : null
273
+ } ,
270
274
bodyBgVariant : {
271
275
type : String ,
272
276
default : null
@@ -275,6 +279,10 @@ export default {
275
279
type : String ,
276
280
default : null
277
281
} ,
282
+ bodyClass : {
283
+ type : [ String , Array ] ,
284
+ default : null
285
+ } ,
278
286
footerBgVariant : {
279
287
type : String ,
280
288
default : null
@@ -287,6 +295,10 @@ export default {
287
295
type : String ,
288
296
default : null
289
297
} ,
298
+ footerClass : {
299
+ type : [ String , Array ] ,
300
+ default : null
301
+ } ,
290
302
hideHeader : {
291
303
type : Boolean ,
292
304
default : false
@@ -387,7 +399,8 @@ export default {
387
399
[ `bg-${ this . headerBgVariant } ` ] : Boolean ( this . headerBgVariant ) ,
388
400
[ `text-${ this . headerTextVariant } ` ] : Boolean ( this . headerTextVariant ) ,
389
401
[ `border-${ this . headerBorderVariant } ` ] : Boolean ( this . headerBorderVariant )
390
- }
402
+ } ,
403
+ this . headerClass
391
404
]
392
405
} ,
393
406
bodyClasses ( ) {
@@ -396,7 +409,8 @@ export default {
396
409
{
397
410
[ `bg-${ this . bodyBgVariant } ` ] : Boolean ( this . bodyBgVariant ) ,
398
411
[ `text-${ this . bodyTextVariant } ` ] : Boolean ( this . bodyTextVariant )
399
- }
412
+ } ,
413
+ this . bodyClass
400
414
]
401
415
} ,
402
416
footerClasses ( ) {
@@ -406,7 +420,8 @@ export default {
406
420
[ `bg-${ this . footerBgVariant } ` ] : Boolean ( this . footerBgVariant ) ,
407
421
[ `text-${ this . footerTextVariant } ` ] : Boolean ( this . footerTextVariant ) ,
408
422
[ `border-${ this . footerBorderVariant } ` ] : Boolean ( this . footerBorderVariant )
409
- }
423
+ } ,
424
+ this . footerClass
410
425
]
411
426
}
412
427
} ,
You can’t perform that action at this time.
0 commit comments