diff options
author | Volpeon <git@volpeon.ink> | 2023-01-30 17:12:41 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2023-01-30 17:12:41 +0100 |
commit | 2336e6b58fd6ff5e56fd87fe3644b0ddf865fff8 (patch) | |
tree | 6b50236f8f865fdd35ee4620b1073aa491c791d5 /tpl/objects | |
parent | Update (diff) | |
download | iro-design-2336e6b58fd6ff5e56fd87fe3644b0ddf865fff8.tar.gz iro-design-2336e6b58fd6ff5e56fd87fe3644b0ddf865fff8.tar.bz2 iro-design-2336e6b58fd6ff5e56fd87fe3644b0ddf865fff8.zip |
Added round button variant
Diffstat (limited to 'tpl/objects')
-rw-r--r-- | tpl/objects/button.pug | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tpl/objects/button.pug b/tpl/objects/button.pug index 8cae2f1..e99e5ab 100644 --- a/tpl/objects/button.pug +++ b/tpl/objects/button.pug | |||
@@ -3,7 +3,8 @@ mixin a-button | |||
3 | let classes = { | 3 | let classes = { |
4 | 'o-button': true, | 4 | 'o-button': true, |
5 | 'o-button--block': attributes.block, | 5 | 'o-button--block': attributes.block, |
6 | 'o-button--outline': attributes.outline | 6 | 'o-button--outline': attributes.outline, |
7 | 'o-button--round': !!attributes.icon | ||
7 | } | 8 | } |
8 | if (attributes.variant) { | 9 | if (attributes.variant) { |
9 | classes['o-button--' + attributes.variant] = true | 10 | classes['o-button--' + attributes.variant] = true |
@@ -12,4 +13,7 @@ mixin a-button | |||
12 | let href = attributes.disabled ? null : '#'; | 13 | let href = attributes.disabled ? null : '#'; |
13 | 14 | ||
14 | a(class=classes href=href aria-disabled=attributes.disabled && String(attributes.disabled)) | 15 | a(class=classes href=href aria-disabled=attributes.disabled && String(attributes.disabled)) |
16 | if attributes.icon | ||
17 | +icon(attributes.icon)(block=!block) | ||
18 | = ' ' | ||
15 | block | 19 | block |