diff options
author | Volpeon <git@volpeon.ink> | 2023-01-28 09:34:19 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2023-01-28 09:34:19 +0100 |
commit | ac04c0bb55f51dd18daaf6813c47a0db8525180f (patch) | |
tree | 0905dce4274c39562b630fe73268b5eba8f101ff /tpl/objects | |
parent | Lightbox (diff) | |
download | iro-design-ac04c0bb55f51dd18daaf6813c47a0db8525180f.tar.gz iro-design-ac04c0bb55f51dd18daaf6813c47a0db8525180f.tar.bz2 iro-design-ac04c0bb55f51dd18daaf6813c47a0db8525180f.zip |
Added overflow button
Diffstat (limited to 'tpl/objects')
-rw-r--r-- | tpl/objects/action-button.pug | 4 | ||||
-rw-r--r-- | tpl/objects/overflow-button.pug | 22 |
2 files changed, 23 insertions, 3 deletions
diff --git a/tpl/objects/action-button.pug b/tpl/objects/action-button.pug index f99d789..e11e4a5 100644 --- a/tpl/objects/action-button.pug +++ b/tpl/objects/action-button.pug | |||
@@ -19,6 +19,4 @@ mixin action-button | |||
19 | if attributes.icon | 19 | if attributes.icon |
20 | +icon(attributes.icon)(block=!block) | 20 | +icon(attributes.icon)(block=!block) |
21 | = ' ' | 21 | = ' ' |
22 | if block | 22 | block |
23 | span.o-action-button__label | ||
24 | block | ||
diff --git a/tpl/objects/overflow-button.pug b/tpl/objects/overflow-button.pug new file mode 100644 index 0000000..f52f12b --- /dev/null +++ b/tpl/objects/overflow-button.pug | |||
@@ -0,0 +1,22 @@ | |||
1 | include icon.pug | ||
2 | |||
3 | mixin overflow-button | ||
4 | - | ||
5 | let classes = { | ||
6 | 'o-overflow-button': true, | ||
7 | 'u-d-block': attributes.block, | ||
8 | 'is-selected': attributes.selected | ||
9 | } | ||
10 | if (attributes.class) { | ||
11 | classes[attributes.class] = true; | ||
12 | } | ||
13 | |||
14 | let href = attributes.disabled ? null : '#'; | ||
15 | |||
16 | a(class=classes href=href) | ||
17 | .o-overflow-button__inside | ||
18 | if attributes.icon | ||
19 | +icon(attributes.icon)(block=!block) | ||
20 | = ' ' | ||
21 | .o-overflow-button__outside | ||
22 | block | ||