File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { CustomElementDeclaration } from 'custom-elements-manifest/schema' ;
22
33import { LitElement , type TemplateResult , html , unsafeCSS } from 'lit' ;
4+ import { unsafeStatic , withStatic } from 'lit/static-html.js' ;
45import { customElement , property , state } from 'lit/decorators.js' ;
56import { ifDefined } from 'lit/directives/if-defined.js' ;
67import { map } from 'lit/directives/map.js' ;
@@ -181,9 +182,12 @@ export class Root extends Routable(ColorSchemable(LitElement)) {
181182 protected renderElement ( tagName : string ) : TemplateResult {
182183 return html `
183184 < wcp-preview-frame initial-preview-tab ="${ ifDefined ( this . initialPreviewTab ) } ">
184- < wcp-preview-frame-examples .element ="${ this . manifest ?. elements . get ( tagName ) } "> </ wcp-preview-frame-examples >
185- < wcp-preview-frame-readme .element ="${ this . manifest ?. elements . get ( tagName ) } "> </ wcp-preview-frame-readme >
186- < wcp-preview-frame-viewer .element ="${ this . manifest ?. elements . get ( tagName ) } "> </ wcp-preview-frame-viewer >
185+ ${ map (
186+ this . config ?. previewFramePlugins ?? [ ] ,
187+ ( plugin ) => withStatic ( html ) `
188+ <${ unsafeStatic ( plugin ) } .element="${ this . manifest ?. elements . get ( tagName ) } "></${ unsafeStatic ( plugin ) } >
189+ `
190+ ) }
187191 </ wcp-preview-frame >
188192 ` ;
189193 }
You can’t perform that action at this time.
0 commit comments