File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,11 @@ export const props = {
13
13
type : String
14
14
} ,
15
15
toggleable : {
16
- type : Boolean ,
16
+ type : [ Boolean , String ] ,
17
17
default : false
18
18
} ,
19
19
toggleBreakpoint : {
20
+ // Deprecated: to be removed soon
20
21
type : String ,
21
22
default : null
22
23
} ,
@@ -33,11 +34,10 @@ export default {
33
34
functional : true ,
34
35
props,
35
36
render ( h , { props, data, children } ) {
36
- let toggleClass = "navbar-toggleable" ;
37
- if ( props . toggleBreakpoint ) {
38
- toggleClass += `- ${ props . toggleBreakpoint } ` ;
37
+ let breakpoint = this . toggleBreakpoint || 'sm' ;
38
+ if ( typeof this . toggleable === 'string' ) {
39
+ breakpoint = this . toggleable ;
39
40
}
40
-
41
41
return h (
42
42
props . tag ,
43
43
mergeData ( data , {
@@ -47,7 +47,7 @@ export default {
47
47
[ `bg-${ props . variant } ` ] : Boolean ( props . variant ) ,
48
48
[ `fixed-${ props . fixed } ` ] : Boolean ( props . fixed ) ,
49
49
"sticky-top" : props . sticky ,
50
- [ toggleClass ] : props . toggleable
50
+ [ `navbar-expand- ${ breakpoint } ` ] : Boolean ( props . toggleable )
51
51
}
52
52
} ) ,
53
53
children
You can’t perform that action at this time.
0 commit comments