Implement group item
This commit is contained in:
parent
269d899a99
commit
43cc5079d8
3 changed files with 62 additions and 13 deletions
|
@ -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`)
|
||||
}
|
||||
}))
|
||||
)
|
||||
})
|
||||
])
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue