From 8e009d5036b95015c4425e27c21e9aa0d3a4a952 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 23 Jul 2025 10:37:06 +0200 Subject: Button: Rename static variant to badge --- tpl/objects/button.pug | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) (limited to 'tpl/objects/button.pug') diff --git a/tpl/objects/button.pug b/tpl/objects/button.pug index b9b4cbd..c356bfe 100644 --- a/tpl/objects/button.pug +++ b/tpl/objects/button.pug @@ -4,13 +4,13 @@ mixin button - let classes = { 'o-button': true, - 'u-d-block': attributes.block, + 'u-d-block': attributes.block, 'o-button--secondary': attributes.secondary, 'o-button--quiet': attributes.quiet, 'o-button--pill': attributes.pill, - 'o-button--static': attributes.static, + 'o-button--badge': attributes.badge, 'o-button--icon': !!attributes.icon && !block, - 'is-selected': attributes.selected, + 'is-selected': attributes.selected, } if (attributes.theme) { classes['o-button--' + attributes.theme] = true @@ -24,25 +24,13 @@ mixin button let href = attributes.disabled ? null : '#'; - if attributes.badge - span(class=classes href=href) - if attributes.icon - +icon(attributes.icon) - = ' ' - if block - span.o-button__label - block - if attributes.postIcon - = ' ' - +icon(attributes.postIcon) - else - a(class=classes href=href) - if attributes.icon - +icon(attributes.icon) - = ' ' - if block - span.o-button__label - block - if attributes.postIcon - = ' ' - +icon(attributes.postIcon) + a(class=classes href=href) + if attributes.icon + +icon(attributes.icon) + = ' ' + if block + span.o-button__label + block + if attributes.postIcon + = ' ' + +icon(attributes.postIcon) -- cgit v1.2.3-70-g09d2