diff options
Diffstat (limited to 'tpl/objects')
-rw-r--r-- | tpl/objects/action-button.pug | 21 |
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 @@ | |||
1 | include icon.pug | ||
2 | |||
3 | mixin 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 | ||