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