diff options
| author | Volpeon <git@volpeon.ink> | 2025-07-23 08:34:23 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2025-07-23 08:34:23 +0200 |
| commit | 5c878876d3bdd2c7cd094871fa0644f3310bcec8 (patch) | |
| tree | 0a41059f6983040f429d786ab0ad0dbf89764e96 /tpl/objects/badge.pug | |
| parent | Fixed divider (diff) | |
| download | iro-design-5c878876d3bdd2c7cd094871fa0644f3310bcec8.tar.gz iro-design-5c878876d3bdd2c7cd094871fa0644f3310bcec8.tar.bz2 iro-design-5c878876d3bdd2c7cd094871fa0644f3310bcec8.zip | |
Commit merge of button and badge into action-button (and rename it to button)
Diffstat (limited to 'tpl/objects/badge.pug')
| -rw-r--r-- | tpl/objects/badge.pug | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tpl/objects/badge.pug b/tpl/objects/badge.pug deleted file mode 100644 index 48e4029..0000000 --- a/tpl/objects/badge.pug +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | mixin badge(variant) | ||
| 2 | - | ||
| 3 | let classes = { | ||
| 4 | 'o-badge': true, | ||
| 5 | 'o-badge--pill': !!attributes.pill, | ||
| 6 | 'o-badge--quiet': !!attributes.quiet, | ||
| 7 | 'o-menu__badge': !!attributes.menu, | ||
| 8 | } | ||
| 9 | if (attributes.size) { | ||
| 10 | classes['o-badge--' + attributes.size] = true | ||
| 11 | } | ||
| 12 | if (variant) { | ||
| 13 | classes['o-badge--' + variant] = true | ||
| 14 | } | ||
| 15 | |||
| 16 | if attributes.href | ||
| 17 | a(href=attributes.href class=classes) | ||
| 18 | if attributes.icon | ||
| 19 | +icon(attributes.icon) | ||
| 20 | = ' ' | ||
| 21 | if block | ||
| 22 | span.o-badge__label | ||
| 23 | block | ||
| 24 | if attributes.postIcon | ||
| 25 | = ' ' | ||
| 26 | +icon(attributes.postIcon) | ||
| 27 | else | ||
| 28 | span(class=classes) | ||
| 29 | if attributes.icon | ||
| 30 | +icon(attributes.icon) | ||
| 31 | = ' ' | ||
| 32 | if block | ||
| 33 | span.o-badge__label | ||
| 34 | block | ||
| 35 | if attributes.postIcon | ||
| 36 | = ' ' | ||
| 37 | +icon(attributes.postIcon) | ||
