Skip to content

Commit

Permalink
fix(navbar): breakpoint not working
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorehouse committed Aug 16, 2017
1 parent 825093f commit 42ca902
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/components/navbar.js
Expand Up @@ -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
},
Expand All @@ -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, {
Expand All @@ -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
Expand Down

0 comments on commit 42ca902

Please sign in to comment.