add iconPosition property to touch bar buttons
This commit is contained in:
parent
4d9977dac1
commit
11c7c107a9
3 changed files with 12 additions and 1 deletions
|
@ -159,10 +159,11 @@ TouchBar.TouchBarButton = class TouchBarButton extends TouchBarItem {
|
|||
super()
|
||||
if (config == null) config = {}
|
||||
this.type = 'button'
|
||||
const {click, icon, label, backgroundColor} = config
|
||||
const {click, icon, iconPosition, label, backgroundColor} = config
|
||||
this._addLiveProperty('label', label)
|
||||
this._addLiveProperty('backgroundColor', backgroundColor)
|
||||
this._addLiveProperty('icon', icon)
|
||||
this._addLiveProperty('iconPosition', iconPosition)
|
||||
if (typeof click === 'function') {
|
||||
this.onInteraction = () => {
|
||||
config.click()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue