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/action-button.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/action-button.pug')
| -rw-r--r-- | tpl/objects/action-button.pug | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/tpl/objects/action-button.pug b/tpl/objects/action-button.pug deleted file mode 100644 index 0e77e58..0000000 --- a/tpl/objects/action-button.pug +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | include icon.pug | ||
| 2 | |||
| 3 | mixin action-button | ||
| 4 | - | ||
| 5 | let classes = { | ||
| 6 | 'o-action-button': true, | ||
| 7 | 'u-d-block': attributes.block, | ||
| 8 | 'o-action-button--secondary': attributes.secondary, | ||
| 9 | 'o-action-button--quiet': attributes.quiet, | ||
| 10 | 'o-action-button--pill': attributes.pill, | ||
| 11 | 'o-action-button--static': attributes.static, | ||
| 12 | 'o-action-button--icon': !!attributes.icon && !block, | ||
| 13 | 'is-selected': attributes.selected, | ||
| 14 | } | ||
| 15 | if (attributes.theme) { | ||
| 16 | classes['o-action-button--' + attributes.theme] = true | ||
| 17 | } | ||
| 18 | if (attributes.size) { | ||
| 19 | classes['o-action-button--' + attributes.size] = true | ||
| 20 | } | ||
| 21 | if (attributes.class) { | ||
| 22 | classes[attributes.class] = true; | ||
| 23 | } | ||
| 24 | |||
| 25 | let href = attributes.disabled ? null : '#'; | ||
| 26 | |||
| 27 | a(class=classes href=href) | ||
| 28 | if attributes.icon | ||
| 29 | +icon(attributes.icon) | ||
| 30 | = ' ' | ||
| 31 | if block | ||
| 32 | span.o-action-button__label | ||
| 33 | block | ||
| 34 | if attributes.postIcon | ||
| 35 | = ' ' | ||
| 36 | +icon(attributes.postIcon) | ||
