How to render component from string in litelement? It is possible or it is possible to convert string to TemplateResult?
My code not working
export class MyElement extends ScopedElementsMixin(LitElement) {
static get scopedElements() {
return {
'panel-group': PanelGroup,
'panel': Panel,
}
}
static get properties() {
return {
controls: { type: String }
}
}
createRenderRoot() {
return this;
}
render() {
// example insert string
// const controls = "<panel-group name=panel><panel key=0 panelValue=0 label=true></panel><panel key=1 panelValue=1 label=false></panel></panel-group>"
return html`${unsafeHTML`${this.props.controls}`}`;
}
}