From 71af9d144c4dfc27c8824aec4d945897289ed440 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 26 Jun 2024 14:46:36 +0200 Subject: Add static themes to action button --- tpl/views/action-button.pug | 22 ++++++++++++++++++++++ tpl/views/button.pug | 15 ++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) (limited to 'tpl/views') diff --git a/tpl/views/action-button.pug b/tpl/views/action-button.pug index 2c94c68..8fbf9ea 100644 --- a/tpl/views/action-button.pug +++ b/tpl/views/action-button.pug @@ -85,3 +85,25 @@ mixin view-action-button +action-button(pill=true quiet=true disabled=true)= 'Disabled' = ' ' +action-button(pill=true quiet=true selected=true disabled=true)= 'Selected + disabled' + + each theme in ['static-black', 'static-white'] + - + const bg = theme.startsWith('static-black') ? 500 : 1000; + + .c-box(style=`background-color: var(--colors--blue-static--${bg});`) + +action-button(theme=theme)= 'Idle' + = ' ' + +action-button(theme=theme selected=true)= 'Selected' + = ' ' + +action-button(theme=theme disabled=true)= 'Disabled' + = ' ' + +action-button(theme=theme selected=true disabled=true)= 'Selected + disabled' + + .c-box(style=`background-color: var(--colors--blue-static--${bg});`) + +action-button(theme=theme quiet=true)= 'Idle' + = ' ' + +action-button(theme=theme quiet=true selected=true)= 'Selected' + = ' ' + +action-button(theme=theme quiet=true disabled=true)= 'Disabled' + = ' ' + +action-button(theme=theme quiet=true selected=true disabled=true)= 'Selected + disabled' diff --git a/tpl/views/button.pug b/tpl/views/button.pug index c476d9b..eacf302 100644 --- a/tpl/views/button.pug +++ b/tpl/views/button.pug @@ -45,7 +45,7 @@ mixin view-button +a-button(variant=theme outline=true icon='trash') +a-button(variant=theme outline=true disabled=true icon='trash') - each theme in ['static-black', 'static-black-primary', 'static-white', 'static-white-primary'] + each theme in ['static-black', 'static-white'] - const bg = theme.startsWith('static-black') ? 500 : 1000; @@ -61,3 +61,16 @@ mixin view-button +a-button(variant=theme disabled=true icon='trash') +a-button(variant=theme outline=true icon='trash') +a-button(variant=theme outline=true disabled=true icon='trash') + + .c-box(style=`background-color: var(--colors--blue-static--${bg});`) + .l-button-group + +a-button(variant=theme primary=true)= 'Button' + +a-button(variant=theme primary=true disabled=true)= 'Button' + +a-button(variant=theme primary=true outline=true)= 'Button' + +a-button(variant=theme primary=true outline=true disabled=true)= 'Button' + br + .l-button-group + +a-button(variant=theme primary=true icon='trash') + +a-button(variant=theme primary=true disabled=true icon='trash') + +a-button(variant=theme primary=true outline=true icon='trash') + +a-button(variant=theme primary=true outline=true disabled=true icon='trash') -- cgit v1.2.3-70-g09d2