From dbb6887ce219342e6a110e0cef536a0c29c19f7d Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 6 Feb 2022 15:06:00 +0100 Subject: Added action button --- tpl/objects/action-button.pug | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tpl/objects/action-button.pug (limited to 'tpl/objects') diff --git a/tpl/objects/action-button.pug b/tpl/objects/action-button.pug new file mode 100644 index 0000000..0afe1ea --- /dev/null +++ b/tpl/objects/action-button.pug @@ -0,0 +1,21 @@ +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 : '#'; + + 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