From 8f49d0cba610e4829e183e81e4126aba136dfccc Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 7 Feb 2022 18:37:09 +0100 Subject: Added action-menu --- tpl/objects/action-button.pug | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'tpl/objects/action-button.pug') diff --git a/tpl/objects/action-button.pug b/tpl/objects/action-button.pug index 0afe1ea..eb524a2 100644 --- a/tpl/objects/action-button.pug +++ b/tpl/objects/action-button.pug @@ -1,21 +1,24 @@ include icon.pug mixin action-button - - - let classes = { - 'o-action-button': true, - 'o-action-button--block': attributes.block, - 'o-action-button--quiet': attributes.quiet, - 'is-disabled': attributes.disabled, - 'is-selected': attributes.selected - } - - let href = attributes.disabled ? null : '#'; + - + let classes = { + 'o-action-button': true, + 'o-action-button--block': attributes.block, + 'o-action-button--quiet': attributes.quiet, + 'is-disabled': attributes.disabled, + 'is-selected': attributes.selected + } + if (attributes.class) { + classes[attributes.class] = true; + } - a(class=classes href=href) - if attributes.icon - +icon(attributes.icon) - = ' ' - if block - span.o-action-button__label - block + let href = attributes.disabled ? null : '#'; + + a(class=classes href=href) + if attributes.icon + +icon(attributes.icon) + = ' ' + if block + span.o-action-button__label + block -- cgit v1.2.3-54-g00ecf