File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
packages/openscd/src/addons Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -404,11 +404,27 @@ export class OscdLayout extends LitElement {
404
404
slot= "navigationIcon"
405
405
@click = ${ ( ) => ( this . menuUI . open = true ) }
406
406
> </ mwc- icon- butto n>
407
- <div slot = "title" id = "title" > ${ this . docName } < / div >
408
- ${ this . menu . map ( this . renderActionItem ) }
407
+ ${ this . renderTitle ( ) }
408
+ ${ this . renderActionItems ( ) }
409
409
</ mwc- to p- app- bar- fixed> ` ;
410
410
}
411
411
412
+ /**
413
+ * Renders the title section in the top bar
414
+ * Make sure to use slot="title" for the returned template
415
+ */
416
+ protected renderTitle ( ) : TemplateResult {
417
+ return html `<div slot= "title" id = "title"> ${ this . docName } </ div> ` ;
418
+ }
419
+
420
+ /**
421
+ * Renders the action items for the top bar
422
+ * Make sure to use slot="actionItems" for each element
423
+ */
424
+ protected renderActionItems ( ) : TemplateResult {
425
+ return html `${ this . menu . map ( this . renderActionItem ) } ` ;
426
+ }
427
+
412
428
protected renderMenuContent ( ) : TemplateResult {
413
429
return html `
414
430
<div id= "menuContent" >
You can’t perform that action at this time.
0 commit comments