summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'tpl')
-rw-r--r--tpl/index.pug3
-rw-r--r--tpl/objects/action-button.pug4
-rw-r--r--tpl/objects/overflow-button.pug22
-rw-r--r--tpl/views/overflow-button.pug10
4 files changed, 36 insertions, 3 deletions
diff --git a/tpl/index.pug b/tpl/index.pug
index 1f4f522..15929cf 100644
--- a/tpl/index.pug
+++ b/tpl/index.pug
@@ -17,6 +17,7 @@ include objects/checkbox.pug
17include objects/switch.pug 17include objects/switch.pug
18include objects/form.pug 18include objects/form.pug
19include objects/action-button.pug 19include objects/action-button.pug
20include objects/overflow-button.pug
20include objects/status-indicator.pug 21include objects/status-indicator.pug
21include objects/avatar.pug 22include objects/avatar.pug
22include objects/action-menu.pug 23include objects/action-menu.pug
@@ -65,6 +66,7 @@ include views/checkbox.pug
65include views/switch.pug 66include views/switch.pug
66include views/form.pug 67include views/form.pug
67include views/action-button.pug 68include views/action-button.pug
69include views/overflow-button.pug
68include views/status-indicator.pug 70include views/status-indicator.pug
69include views/avatar.pug 71include views/avatar.pug
70include views/action-menu.pug 72include views/action-menu.pug
@@ -108,6 +110,7 @@ html
108 +view-switch 110 +view-switch
109 +view-form 111 +view-form
110 +view-action-button 112 +view-action-button
113 +view-overflow-button
111 +view-status-indicator 114 +view-status-indicator
112 +view-avatar 115 +view-avatar
113 +view-action-menu 116 +view-action-menu
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 @@
1include icon.pug
2
3mixin 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
diff --git a/tpl/views/overflow-button.pug b/tpl/views/overflow-button.pug
new file mode 100644
index 0000000..112aaab
--- /dev/null
+++ b/tpl/views/overflow-button.pug
@@ -0,0 +1,10 @@
1mixin view-overflow-button
2 +view('overflow-button', 'Overflow button')
3 .c-box
4 +overflow-button(icon='trash')= '123'
5 = ' '
6 +overflow-button(icon='trash' selected=true)= 'Delete'
7 = ' '
8 +overflow-button(icon='trash' disabled=true)= 'Disabled'
9 = ' '
10 +overflow-button(icon='trash' selected=true disabled=true)= 'Selected + disabled'