diff options
-rw-r--r-- | src/objects/_badge.scss | 2 | ||||
-rw-r--r-- | tpl/objects/badge.pug | 8 | ||||
-rw-r--r-- | tpl/views/action-button.pug | 9 | ||||
-rw-r--r-- | tpl/views/badge.pug | 8 |
4 files changed, 21 insertions, 6 deletions
diff --git a/src/objects/_badge.scss b/src/objects/_badge.scss index bb23f7e..eebf136 100644 --- a/src/objects/_badge.scss +++ b/src/objects/_badge.scss | |||
@@ -77,6 +77,8 @@ | |||
77 | 77 | ||
78 | @include iro.bem-object(iro.props-namespace()) { | 78 | @include iro.bem-object(iro.props-namespace()) { |
79 | display: inline-block; | 79 | display: inline-block; |
80 | margin-top: -.5em; | ||
81 | margin-bottom: -.5em; | ||
80 | padding: fn.dim(--pad-y) fn.dim(--pad-x); | 82 | padding: fn.dim(--pad-y) fn.dim(--pad-x); |
81 | border-radius: fn.dim(--rounding); | 83 | border-radius: fn.dim(--rounding); |
82 | background-color: fn.color(--bg); | 84 | background-color: fn.color(--bg); |
diff --git a/tpl/objects/badge.pug b/tpl/objects/badge.pug index 53e972c..04fd8eb 100644 --- a/tpl/objects/badge.pug +++ b/tpl/objects/badge.pug | |||
@@ -12,5 +12,9 @@ mixin badge(variant) | |||
12 | classes['o-badge--' + variant] = true | 12 | classes['o-badge--' + variant] = true |
13 | } | 13 | } |
14 | 14 | ||
15 | a(href="#", class=classes) | 15 | if attributes.href |
16 | block | 16 | a(href=attributes.href class=classes) |
17 | block | ||
18 | else | ||
19 | span(class=classes) | ||
20 | block | ||
diff --git a/tpl/views/action-button.pug b/tpl/views/action-button.pug index 7bffe72..faa53bc 100644 --- a/tpl/views/action-button.pug +++ b/tpl/views/action-button.pug | |||
@@ -53,3 +53,12 @@ mixin view-action-button | |||
53 | +action-button(quiet=true icon='trash' disabled=true) | 53 | +action-button(quiet=true icon='trash' disabled=true) |
54 | = ' ' | 54 | = ' ' |
55 | +action-button(quiet=true icon='trash' selected=true disabled=true) | 55 | +action-button(quiet=true icon='trash' selected=true disabled=true) |
56 | |||
57 | .c-box | ||
58 | +action-button= 'Idle' | ||
59 | = ' ' | ||
60 | +action-button(icon='trash') | ||
61 | = ' ' | ||
62 | +action-button | ||
63 | = 'Idle' | ||
64 | +badge('primary')= '12' | ||
diff --git a/tpl/views/badge.pug b/tpl/views/badge.pug index 4c44af2..d4ca4b0 100644 --- a/tpl/views/badge.pug +++ b/tpl/views/badge.pug | |||
@@ -9,13 +9,13 @@ mixin view-badge | |||
9 | = ' ' | 9 | = ' ' |
10 | +badge('accent-quiet')= 'new' | 10 | +badge('accent-quiet')= 'new' |
11 | = ' ' | 11 | = ' ' |
12 | +badge(size=200)= '100' | 12 | +badge(size=200 href='#')= '100' |
13 | = ' ' | 13 | = ' ' |
14 | +badge('primary')(size=200)= 'new' | 14 | +badge('primary')(size=200 href='#')= 'new' |
15 | = ' ' | 15 | = ' ' |
16 | +badge('accent')(size=200)= 'new' | 16 | +badge('accent')(size=200 href='#')= 'new' |
17 | = ' ' | 17 | = ' ' |
18 | +badge('accent-quiet')(size=200)= 'new' | 18 | +badge('accent-quiet')(size=200 href='#')= 'new' |
19 | 19 | ||
20 | .c-box | 20 | .c-box |
21 | +badge(pill=true)= '100' | 21 | +badge(pill=true)= '100' |