tabs: fix custom color with nanohtml

This commit is contained in:
jean-emmanuel 2018-11-02 10:38:14 +01:00
parent f01e27894c
commit 8d7c2eb9c7
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 0.39.2
- bug fixes
- regression breaking tabs color property
## 0.39.1
- bug fixes

View file

@ -133,11 +133,11 @@ class Panel extends Container {
DOM.each(this.wrapper, '> .widget', (tab)=>{
let widget = widgetManager.getWidgetByElement(tab),
style = widget.getProp('color') == 'auto' ? '' : `style="--color-custom:${widget.getProp('color')}"`
style = widget.getProp('color') == 'auto' ? '' : `--color-custom:${widget.getProp('color')}`
this.tabs.push(widget)
this.navigation.appendChild(html`
<li class="tablink" data-widget="${widget.hash}" ${style}>
<li class="tablink" data-widget="${widget.hash}" style="${style}">
<a><span>${raw(DOM.get(tab, '> .label')[0].innerHTML)}</span></a>
</li>
`)