Created
February 27, 2020 14:14
-
-
Save FlorianRappl/8516aeeab9363a3b4b6e4ef7063efb1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const componentReferences = {}; | |
@customElement('component-reference') | |
export class ComponentReference extends LitElement { | |
@property() name = ''; | |
render() { | |
const refs = componentReferences[this.name] || []; | |
const content = refs.map(r => `<${r}></${r}>`).join(''); | |
return html([content]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment