summaryrefslogtreecommitdiffstats
path: root/tpl/objects
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-02-06 15:06:00 +0100
committerVolpeon <git@volpeon.ink>2022-02-06 15:06:00 +0100
commitdbb6887ce219342e6a110e0cef536a0c29c19f7d (patch)
tree27347d7394a6adf89754d25167a7a1ef0f218216 /tpl/objects
parentImproved text field (diff)
downloadiro-design-dbb6887ce219342e6a110e0cef536a0c29c19f7d.tar.gz
iro-design-dbb6887ce219342e6a110e0cef536a0c29c19f7d.tar.bz2
iro-design-dbb6887ce219342e6a110e0cef536a0c29c19f7d.zip
Added action button
Diffstat (limited to 'tpl/objects')
-rw-r--r--tpl/objects/action-button.pug21
1 files changed, 21 insertions, 0 deletions
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 @@
1include icon.pug
2
3mixin action-button
4 -
5 let classes = {
6 'o-action-button': true,
7 'o-action-button--block': attributes.block,
8 'o-action-button--quiet': attributes.quiet,
9 'is-disabled': attributes.disabled,
10 'is-selected': attributes.selected
11 }
12
13 let href = attributes.disabled ? null : '#';
14
15 a(class=classes href=href)
16 if attributes.icon
17 +icon(attributes.icon)
18 = ' '
19 if block
20 span.o-action-button__label
21 block