switch: fix icons in labels (#413)
This commit is contained in:
parent
eaaad0ff00
commit
ef502a8460
3 changed files with 11 additions and 9 deletions
|
|
@ -1,6 +1,7 @@
|
|||
var Widget = require('../common/widget'),
|
||||
{iconify} = require('../../ui/utils'),
|
||||
html = require('nanohtml')
|
||||
html = require('nanohtml'),
|
||||
raw = require('nanohtml/raw')
|
||||
|
||||
module.exports = class Switch extends Widget {
|
||||
|
||||
|
|
@ -53,7 +54,7 @@ module.exports = class Switch extends Widget {
|
|||
if (this.getProp('showValues') && !isArray) label = label + ': ' + (this.stringValues[this.stringValues.length - 1] || values[k])
|
||||
|
||||
this.widget.appendChild(html`
|
||||
<div class="value"> ${iconify(label)}</div>
|
||||
<div class="value"> ${raw(iconify(label))}</div>
|
||||
`)
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,13 +24,8 @@
|
|||
&.horizontal {
|
||||
flex-direction:row;
|
||||
.value {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
border-top:0;
|
||||
border-right:1rem solid var(--color-bg);
|
||||
flex: 1 1 100%;
|
||||
height:auto;
|
||||
margin-bottom:0;
|
||||
&:last-child {
|
||||
|
|
@ -53,7 +48,8 @@
|
|||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 0 0 1rem var(--color-light) inset,
|
||||
0 1rem 0 0 var(--color-light) inset;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue