fix: icon aligment for tag icons

This commit is contained in:
Moritz Stückler 2020-02-13 14:56:46 +01:00
parent 96b8a97484
commit 5bcc9ff3f1
2 changed files with 9 additions and 4 deletions

View File

@ -2,7 +2,7 @@ export default function tagIcon(tag, attrs = {}, settings = {}) {
const hasIcon = tag && tag.icon();
const { useColor = true } = settings;
attrs.className = hasIcon ? 'icon ' + tag.icon() + ' ' + (attrs.className || '') : 'icon TagIcon ' + (attrs.className || '');
attrs.className = 'icon TagIcon '+ (attrs.className || '') + ' ' + (hasIcon ? tag.icon() : 'default');
if (tag) {
attrs.style = attrs.style || {};

View File

@ -1,14 +1,19 @@
.TagIcon {
border-radius: @border-radius;
width: 16px;
height: 16px;
display: inline-block;
vertical-align: -3px;
margin-left: 1px;
background: @control-bg;
text-align: center;
font-size: 1rem;
&.untagged {
border: 1px dotted @muted-color;
background: transparent;
}
&.default {
border-radius: @border-radius;
background: @control-bg;
vertical-align: -3px;
}
}