summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-02-06 15:06:00 +0100
committerVolpeon <git@volpeon.ink>2022-02-06 15:06:00 +0100
commitdbb6887ce219342e6a110e0cef536a0c29c19f7d (patch)
tree27347d7394a6adf89754d25167a7a1ef0f218216 /tpl
parentImproved text field (diff)
downloadiro-design-dbb6887ce219342e6a110e0cef536a0c29c19f7d.tar.gz
iro-design-dbb6887ce219342e6a110e0cef536a0c29c19f7d.tar.bz2
iro-design-dbb6887ce219342e6a110e0cef536a0c29c19f7d.zip
Added action button
Diffstat (limited to 'tpl')
-rw-r--r--tpl/index.pug61
-rw-r--r--tpl/objects/action-button.pug21
2 files changed, 82 insertions, 0 deletions
diff --git a/tpl/index.pug b/tpl/index.pug
index 6971faa..2980016 100644
--- a/tpl/index.pug
+++ b/tpl/index.pug
@@ -12,6 +12,7 @@ include objects/radio.pug
12include objects/checkbox.pug 12include objects/checkbox.pug
13include objects/switch.pug 13include objects/switch.pug
14include objects/form.pug 14include objects/form.pug
15include objects/action-button.pug
15 16
16mixin box 17mixin box
17 +container(padX=true padY=true inPage=true theme="raised") 18 +container(padX=true padY=true inPage=true theme="raised")
@@ -302,3 +303,63 @@ html
302 303
303 +form-item('') 304 +form-item('')
304 +a-button(variant='primary')= 'Register' 305 +a-button(variant='primary')= 'Register'
306
307 //-----------------------------------------
308
309 +h1-heading(level='xl')= 'Action button'
310 +rule(level='medium')
311
312 +box
313 +action-button= 'Idle'
314 = ' '
315 +action-button(selected=true)= 'Selected'
316 = ' '
317 +action-button(disabled=true)= 'Disabled'
318 = ' '
319 +action-button(selected=true disabled=true)= 'Selected + disabled'
320 br
321 br
322 +action-button(icon='trash')= 'Idle'
323 = ' '
324 +action-button(icon='trash' selected=true)= 'Selected'
325 = ' '
326 +action-button(icon='trash' disabled=true)= 'Disabled'
327 = ' '
328 +action-button(icon='trash' selected=true disabled=true)= 'Selected + disabled'
329 br
330 br
331 +action-button(icon='trash')
332 = ' '
333 +action-button(icon='trash' selected=true)
334 = ' '
335 +action-button(icon='trash' disabled=true)
336 = ' '
337 +action-button(icon='trash' selected=true disabled=true)
338
339 +box
340 +action-button(quiet=true )= 'Idle'
341 = ' '
342 +action-button(quiet=true selected=true)= 'Selected'
343 = ' '
344 +action-button(quiet=true disabled=true)= 'Disabled'
345 = ' '
346 +action-button(quiet=true selected=true disabled=true)= 'Selected + disabled'
347 br
348 br
349 +action-button(quiet=true icon='trash')= 'Idle'
350 = ' '
351 +action-button(quiet=true icon='trash' selected=true)= 'Selected'
352 = ' '
353 +action-button(quiet=true icon='trash' disabled=true)= 'Disabled'
354 = ' '
355 +action-button(quiet=true icon='trash' selected=true disabled=true)= 'Selected + disabled'
356 br
357 br
358 +action-button(quiet=true icon='trash')
359 = ' '
360 +action-button(quiet=true icon='trash' selected=true)
361 = ' '
362 +action-button(quiet=true icon='trash' disabled=true)
363 = ' '
364 +action-button(quiet=true icon='trash' selected=true disabled=true)
365
diff --git a/tpl/objects/action-button.pug b/tpl/objects/action-button.pug
new file mode 100644
index 0000000..0afe1ea
--- /dev/null
+++ b/tpl/objects/action-button.pug
@@ -0,0 +1,21 @@
1include icon.pug
2
3mixin action-button
4 -
5 let classes = {
6 'o-action-button': true,
7 'o-action-button--block': attributes.block,
8 'o-action-button--quiet': attributes.quiet,
9 'is-disabled': attributes.disabled,
10 'is-selected': attributes.selected
11 }
12
13 let href = attributes.disabled ? null : '#';
14
15 a(class=classes href=href)
16 if attributes.icon
17 +icon(attributes.icon)
18 = ' '
19 if block
20 span.o-action-button__label
21 block