Implement group item

This commit is contained in:
Samuel Attard 2016-11-29 18:36:57 +11:00 committed by Kevin Sawicki
parent 269d899a99
commit 43cc5079d8
3 changed files with 62 additions and 13 deletions

View file

@ -48,11 +48,15 @@ exports.load = (appUrl) => {
label: 'foo',
showCloseButton: true,
touchBar: new TouchBar([
new (TouchBar.Button)({
label: 'Sub Button',
click: () => {
console.log('Sub Button Clicked')
}
new (TouchBar.Group)({
items: new TouchBar(
[1, 2, 3].map((i) => new (TouchBar.Button)({
label: `Button ${i}`,
click: () => {
console.log(`Button ${i} (group) Clicked`)
}
}))
)
})
])
}),