blob: 2474cc31411ed7eefc7024abcd6014ed077199b5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
include heading.pug
include header.pug
include sidebar.pug
mixin dialog(title)
- const slots = {}
mixin slot(key)
- slots[key] = block
-
block ? block() : undefined
let classes = {
'o-dialog': true,
}
let bodyClass = {
'o-dialog__body': true
}
if (attributes.bodyClass) {
bodyClass[attributes.bodyClass] = true;
}
div(class=classes)
if slots['sidebar-header']
+header(class='o-dialog__sidebar-header')
- slots['sidebar-header']()
if slots.sidebar
+sidebar(class='o-dialog__sidebar')
- slots.sidebar()
+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'
= ' '
+a-button(variant='accent')= 'Continue'
|