From e4255279ff72e5438d297888d808851cdf2178ed Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 26 Mar 2022 14:40:11 +0100 Subject: Lots of updates, especially dialog --- tpl/objects/dialog.pug | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'tpl/objects/dialog.pug') diff --git a/tpl/objects/dialog.pug b/tpl/objects/dialog.pug index 2823e41..2474cc3 100644 --- a/tpl/objects/dialog.pug +++ b/tpl/objects/dialog.pug @@ -1,7 +1,6 @@ -include rule.pug -include button.pug include heading.pug -include action-button.pug +include header.pug +include sidebar.pug mixin dialog(title) - const slots = {} @@ -13,9 +12,7 @@ mixin dialog(title) block ? block() : undefined let classes = { - 'o-dialog': true, - 't-raised': true, - 'o-dialog--split': !!slots.sidebar, + 'o-dialog': true, } let bodyClass = { @@ -26,16 +23,26 @@ mixin dialog(title) } div(class=classes) + if slots['sidebar-header'] + +header(class='o-dialog__sidebar-header') + - slots['sidebar-header']() + if slots.sidebar - .o-dialog__sidebar + +sidebar(class='o-dialog__sidebar') - slots.sidebar() - header.o-dialog__header - +div-heading('md')(class='o-dialog__title') - = title - +action-button(round=true quiet=true icon='x' class='o-dialog__close-btn') + + +header(class='o-dialog__header') + if slots.header + - slots.header() + else + if title + +div-heading('sm')(class='o-dialog__label')= title + +action-button(round=true quiet=true icon='x' class='o-dialog__close-btn') + section(class=bodyClass) if slots.body - slots.body() + footer.o-dialog__footer.l-button-group +a-button(outline=true)= 'Cancel' = ' ' -- cgit v1.2.3-54-g00ecf