mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Implement group item
This commit is contained in:
committed by
Kevin Sawicki
parent
269d899a99
commit
43cc5079d8
@@ -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`)
|
||||
}
|
||||
}))
|
||||
)
|
||||
})
|
||||
])
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user