From fd5dace4fd42a7005c60970288c098e94d74d00b Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 30 Oct 2023 15:02:23 +0100 Subject: Add pill version for badge --- tpl/objects/badge.pug | 3 ++- tpl/views/badge.pug | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'tpl') diff --git a/tpl/objects/badge.pug b/tpl/objects/badge.pug index 441eb51..53e972c 100644 --- a/tpl/objects/badge.pug +++ b/tpl/objects/badge.pug @@ -2,7 +2,8 @@ mixin badge(variant) - let classes = { 'o-badge': true, - 'o-menu__badge': !!attributes.menu + 'o-badge--pill': !!attributes.pill, + 'o-menu__badge': !!attributes.menu, } if (attributes.size) { classes['o-badge--' + attributes.size] = true diff --git a/tpl/views/badge.pug b/tpl/views/badge.pug index 9979049..4c44af2 100644 --- a/tpl/views/badge.pug +++ b/tpl/views/badge.pug @@ -16,3 +16,20 @@ mixin view-badge +badge('accent')(size=200)= 'new' = ' ' +badge('accent-quiet')(size=200)= 'new' + + .c-box + +badge(pill=true)= '100' + = ' ' + +badge('primary')(pill=true)= 'new' + = ' ' + +badge('accent')(pill=true)= 'new' + = ' ' + +badge('accent-quiet')(pill=true)= 'new' + = ' ' + +badge(size=200, pill=true)= '100' + = ' ' + +badge('primary')(size=200, pill=true)= 'new' + = ' ' + +badge('accent')(size=200, pill=true)= 'new' + = ' ' + +badge('accent-quiet')(size=200, pill=true)= 'new' -- cgit v1.2.3-70-g09d2