blob: 48e4029b1b16095351a4897f64c4d34899f8de92 (
plain) (
tree)
|
|
mixin badge(variant)
-
let classes = {
'o-badge': true,
'o-badge--pill': !!attributes.pill,
'o-badge--quiet': !!attributes.quiet,
'o-menu__badge': !!attributes.menu,
}
if (attributes.size) {
classes['o-badge--' + attributes.size] = true
}
if (variant) {
classes['o-badge--' + variant] = true
}
if attributes.href
a(href=attributes.href class=classes)
if attributes.icon
+icon(attributes.icon)
= ' '
if block
span.o-badge__label
block
if attributes.postIcon
= ' '
+icon(attributes.postIcon)
else
span(class=classes)
if attributes.icon
+icon(attributes.icon)
= ' '
if block
span.o-badge__label
block
if attributes.postIcon
= ' '
+icon(attributes.postIcon)
|