From 8c4acea85943a34e62299f419e93a8f3ce142bb9 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 12 Mar 2022 09:53:20 +0100 Subject: Added list group --- tpl/index.pug | 23 +++++++++++++++++++++-- tpl/objects/list-group.pug | 13 +++++++++++++ tpl/objects/text-field.pug | 3 +-- 3 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 tpl/objects/list-group.pug (limited to 'tpl') diff --git a/tpl/index.pug b/tpl/index.pug index f682c26..e1a6445 100644 --- a/tpl/index.pug +++ b/tpl/index.pug @@ -21,9 +21,10 @@ include objects/menu.pug include objects/backdrop.pug include objects/dialog.pug include objects/lightbox.pug +include objects/list-group.pug mixin box - +container(padX=true padY=true inPage=true theme="raised") + +container(padX=true padY=true inPage=true) block mixin user-card(name, hue) @@ -558,7 +559,6 @@ html +slot('body') p.u-mt-0= loremIpsum - //----------------------------------------- +h1-heading('xl')= 'Lightbox' @@ -577,4 +577,23 @@ html a(href="https://mk.vulpes.one/files/081e0684-08dc-4a42-b810-b0ac63ec7d06") = "https://mk.vulpes.one/files/081e0684-08dc-4a42-b810-b0ac63ec7d06" + //----------------------------------------- + + +h1-heading('xl')= 'List group' + +rule('medium') + + +box + +list-group + +list-group-item= 'First item' + +list-group-item= 'Second item' + +list-group-item= 'Third item' + +list-group-item= 'Fourth item' + + +box + +list-group + +list-group-item(action=true)= 'First item' + +list-group-item(action=true)= 'Second item' + +list-group-item(action=true)= 'Third item' + +list-group-item(action=true)= 'Fourth item' + diff --git a/tpl/objects/list-group.pug b/tpl/objects/list-group.pug new file mode 100644 index 0000000..36be264 --- /dev/null +++ b/tpl/objects/list-group.pug @@ -0,0 +1,13 @@ +mixin list-group + .o-list-group + block + +mixin list-group-item + - + let classes = { + 'o-list-group__item': true, + 'o-list-group__item--action': attributes.action, + } + + div(class=classes) + block diff --git a/tpl/objects/text-field.pug b/tpl/objects/text-field.pug index 2e9827b..cbdb8c4 100644 --- a/tpl/objects/text-field.pug +++ b/tpl/objects/text-field.pug @@ -16,8 +16,7 @@ mixin text-field 'is-disabled': attributes.disabled, 'l-card': !!block, 'l-card--flush': !!block, - 'l-card--gapless': !!block, - 'u-p-xs': !!block + 'l-card--gapless': !!block } div(class=classes aria-disabled=attributes.disabled && String(attributes.disabled)) -- cgit v1.2.3-70-g09d2