From e18669958b229235798e31e5ad8608d9fd30c8e8 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 5 Feb 2022 16:52:52 +0100 Subject: Added button --- tpl/objects/button.pug | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tpl/objects/button.pug (limited to 'tpl/objects') diff --git a/tpl/objects/button.pug b/tpl/objects/button.pug new file mode 100644 index 0000000..243ff58 --- /dev/null +++ b/tpl/objects/button.pug @@ -0,0 +1,16 @@ +mixin a-button + - + let classes = { + 'o-button': true, + 'o-button--block': attributes.block, + 'o-button--outline': attributes.outline, + 'is-disabled': attributes.disabled + } + if (attributes.variant) { + classes['o-button--' + attributes.variant] = true + } + + let href = attributes.disabled ? null : '#'; + + a(class=classes href=href) + block -- cgit v1.2.3-70-g09d2