mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Implement group item
This commit is contained in:
committed by
Kevin Sawicki
parent
269d899a99
commit
43cc5079d8
@@ -74,6 +74,20 @@ TouchBar.ColorPicker = class TouchBarColorPicker extends TouchBarItem {
|
||||
}
|
||||
}
|
||||
|
||||
TouchBar.Group = class TouchBarGroup extends TouchBarItem {
|
||||
constructor (config) {
|
||||
super(config)
|
||||
this.config.type = 'group'
|
||||
}
|
||||
|
||||
toJSON () {
|
||||
const config = this.config;
|
||||
return Object.assign({}, config, {
|
||||
items: config.items && config.items.toJSON ? config.items.toJSON() : []
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
TouchBar.Label = class TouchBarLabel extends TouchBarItem {
|
||||
constructor (config) {
|
||||
super(config)
|
||||
@@ -81,13 +95,6 @@ TouchBar.Label = class TouchBarLabel extends TouchBarItem {
|
||||
}
|
||||
}
|
||||
|
||||
TouchBar.List = class TouchBarList extends TouchBarItem {
|
||||
constructor (config) {
|
||||
super(config)
|
||||
this.config.type = 'list'
|
||||
}
|
||||
}
|
||||
|
||||
TouchBar.PopOver = class TouchBarPopOver extends TouchBarItem {
|
||||
constructor (config) {
|
||||
super(config)
|
||||
|
||||
Reference in New Issue
Block a user