blob: 61ba0b656b337849a14e94dd73dc4d24d1af6059 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
mixin a-button
-
let classes = {
'o-button': true,
'o-button--block': attributes.block,
'o-button--outline': attributes.outline,
'o-button--round': !!attributes.icon
}
if (attributes.variant) {
classes['o-button--' + attributes.variant] = true
}
if (attributes.size) {
classes['o-button--' + attributes.size] = true
}
let href = attributes.disabled ? null : '#';
a(class=classes href=href aria-disabled=attributes.disabled && String(attributes.disabled))
if attributes.icon
+icon(attributes.icon)
= ' '
block
|