tabs: apply custom color to own tab link
This commit is contained in:
parent
9f92e00d57
commit
573e22c83d
2 changed files with 3 additions and 2 deletions
|
|
@ -116,8 +116,9 @@ module.exports = class Panel extends _widgets_base {
|
|||
var tabs = this.wrapper.find('> .widget')
|
||||
|
||||
for (let tab of tabs) {
|
||||
let style = tab.abstract.getProp('color') == 'auto' ? '' : `style="--color-custom:${tab.abstract.getProp('color')}"`
|
||||
this.tabs.push(tab.abstract)
|
||||
this.navigation.append(`<li class="tablink" data-widget="${tab.abstract.hash}"><a><span>${$(tab).find('> .label span').html()}</span></a></li>`)
|
||||
this.navigation.append(`<li class="tablink" data-widget="${tab.abstract.hash}" ${style}><a><span>${$(tab).find('> .label span').html()}</span></a></li>`)
|
||||
}
|
||||
|
||||
this.registerHashes()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue