From 2336e6b58fd6ff5e56fd87fe3644b0ddf865fff8 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 30 Jan 2023 17:12:41 +0100 Subject: Added round button variant --- tpl/objects/button.pug | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tpl/objects') diff --git a/tpl/objects/button.pug b/tpl/objects/button.pug index 8cae2f1..e99e5ab 100644 --- a/tpl/objects/button.pug +++ b/tpl/objects/button.pug @@ -3,7 +3,8 @@ mixin a-button let classes = { 'o-button': true, 'o-button--block': attributes.block, - 'o-button--outline': attributes.outline + 'o-button--outline': attributes.outline, + 'o-button--round': !!attributes.icon } if (attributes.variant) { classes['o-button--' + attributes.variant] = true @@ -12,4 +13,7 @@ mixin a-button let href = attributes.disabled ? null : '#'; a(class=classes href=href aria-disabled=attributes.disabled && String(attributes.disabled)) + if attributes.icon + +icon(attributes.icon)(block=!block) + = ' ' block -- cgit v1.2.3-70-g09d2