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 {
404404 slot= "navigationIcon"
405405 @click = ${ ( ) => ( this . menuUI . open = true ) }
406406 > </ 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 ( ) }
409409 </ mwc- to p- app- bar- fixed> ` ;
410410 }
411411
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+
412428 protected renderMenuContent ( ) : TemplateResult {
413429 return html `
414430 <div id= "menuContent" >
You can’t perform that action at this time.
0 commit comments