Support icon property to match MenuItem
This commit is contained in:
parent
506b42b563
commit
a34f9d3583
2 changed files with 3 additions and 2 deletions
|
@ -115,9 +115,10 @@ TouchBar.Button = class TouchBarButton extends TouchBarItem {
|
|||
constructor (config) {
|
||||
super(config)
|
||||
this.type = 'button'
|
||||
const {click, label, backgroundColor} = config
|
||||
const {click, icon, label, backgroundColor} = config
|
||||
this._addLiveProperty('label', label)
|
||||
this._addLiveProperty('backgroundColor', backgroundColor)
|
||||
this._addLiveProperty('icon', icon)
|
||||
if (typeof click === 'function') {
|
||||
this.onInteraction = config.click
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue