Permalink
Browse files

fix(navbar): breakpoint not working

  • Loading branch information...
tmorehouse committed Aug 16, 2017
1 parent 825093f commit 42ca902c153eff1c43acd7aa8c855410b7f42883
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/components/navbar.js
@@ -13,10 +13,11 @@ export const props = {
type: String
},
toggleable: {
type: Boolean,
type: [Boolean, String],
default: false
},
toggleBreakpoint: {
// Deprecated: to be removed soon
type: String,
default: null
},
@@ -33,11 +34,10 @@ export default {
functional: true,
props,
render(h, { props, data, children }) {
let toggleClass = "navbar-toggleable";
if (props.toggleBreakpoint) {
toggleClass += `-${props.toggleBreakpoint}`;
let breakpoint = this.toggleBreakpoint || 'sm';
if (typeof this.toggleable === 'string') {
breakpoint = this.toggleable;
}

return h(
props.tag,
mergeData(data, {
@@ -47,7 +47,7 @@ export default {
[`bg-${props.variant}`]: Boolean(props.variant),
[`fixed-${props.fixed}`]: Boolean(props.fixed),
"sticky-top": props.sticky,
[toggleClass]: props.toggleable
[`navbar-expand-${breakpoint}`]: Boolean(props.toggleable)
}
}),
children

0 comments on commit 42ca902

Please sign in to comment.