add iconPosition property to touch bar buttons

This commit is contained in:
Samuel Attard 2017-04-17 12:26:33 +12:00 committed by Kevin Sawicki
parent 4d9977dac1
commit 11c7c107a9
3 changed files with 12 additions and 1 deletions

View file

@ -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()