File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed
packages/uui-dialog-layout/lib Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,22 @@ export class UUIDialogLayoutElement extends LitElement {
38
38
( e . target as HTMLSlotElement ) . assignedNodes ( { flatten : true } ) . length > 0 ;
39
39
} ;
40
40
41
+ /**
42
+ * Renders a h3 with the headline slot nested
43
+ * @returns {TemplateResult }
44
+ * @protected
45
+ * @method
46
+ */
47
+ protected renderHeadline ( ) {
48
+ return html ` < h3
49
+ style =${ this . _headlineSlotHasContent || this . headline !== null
50
+ ? ''
51
+ : 'display: none' } >
52
+ ${ this . headline }
53
+ < slot name ="headline " @slotchange =${ this . _headlineSlotChanged } > </ slot >
54
+ </ h3 > ` ;
55
+ }
56
+
41
57
/**
42
58
* Renders default slot
43
59
* @returns {TemplateResult }
@@ -59,15 +75,7 @@ export class UUIDialogLayoutElement extends LitElement {
59
75
}
60
76
61
77
render ( ) {
62
- return html `
63
- < h3
64
- style =${ this . _headlineSlotHasContent || this . headline !== null
65
- ? ''
66
- : 'display: none' } >
67
- ${ this . headline }
68
- < slot name ="headline " @slotchange =${ this . _headlineSlotChanged } > </ slot >
69
- </ h3 >
70
- ${ this . renderContent ( ) } ${ this . renderActions ( ) }
71
- ` ;
78
+ return html `${ this . renderHeadline ( ) } ${ this . renderContent ( ) }
79
+ ${ this . renderActions ( ) } ` ;
72
80
}
73
81
}
You can’t perform that action at this time.
0 commit comments