diff options
Diffstat (limited to 'tpl/objects')
| -rw-r--r-- | tpl/objects/button.pug | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ | |||
| 1 | mixin a-button | ||
| 2 | - | ||
| 3 | let classes = { | ||
| 4 | 'o-button': true, | ||
| 5 | 'o-button--block': attributes.block, | ||
| 6 | 'o-button--outline': attributes.outline, | ||
| 7 | 'is-disabled': attributes.disabled | ||
| 8 | } | ||
| 9 | if (attributes.variant) { | ||
| 10 | classes['o-button--' + attributes.variant] = true | ||
| 11 | } | ||
| 12 | |||
| 13 | let href = attributes.disabled ? null : '#'; | ||
| 14 | |||
| 15 | a(class=classes href=href) | ||
| 16 | block | ||
