Skip to content

Commit

Permalink
feat(dropdown, nav-item-dropdown): support menuClass and extraMenuCla…
Browse files Browse the repository at this point in the history
…sses (#1683)
  • Loading branch information
RomeroMsk authored and pi0 committed Mar 31, 2018
1 parent e3336c5 commit 3da5f18
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/components/dropdown/dropdown.js
Expand Up @@ -95,6 +95,10 @@ export default {
type: String,
default: null
},
menuClass: {
type: [String, Array],
default: null
},
toggleClass: {
type: [String, Array],
default: null
Expand Down Expand Up @@ -135,8 +139,11 @@ export default {
menuClasses () {
return [
'dropdown-menu',
this.right ? 'dropdown-menu-right' : '',
this.visible ? 'show' : ''
{
'dropdown-menu-right': this.right,
'show': this.visible
},
this.menuClass
]
},
toggleClasses () {
Expand Down
8 changes: 7 additions & 1 deletion src/components/nav/nav-item-dropdown.js
Expand Up @@ -72,7 +72,8 @@ export default {
return [
'dropdown-menu',
this.right ? 'dropdown-menu-right' : 'dropdown-menu-left',
this.visible ? 'show' : ''
this.visible ? 'show' : '',
this.extraMenuClasses ? this.extraMenuClasses : ''
]
}
},
Expand All @@ -86,6 +87,11 @@ export default {
type: String,
default: ''
},
extraMenuClasses: {
// Extra Menu classes
type: String,
default: ''
},
role: {
type: String,
default: 'menu'
Expand Down

0 comments on commit 3da5f18

Please sign in to comment.