Skip to content

Instantly share code, notes, and snippets.

@FlorianRappl
Created February 27, 2020 14:14
Show Gist options
  • Save FlorianRappl/8516aeeab9363a3b4b6e4ef7063efb1e to your computer and use it in GitHub Desktop.
Save FlorianRappl/8516aeeab9363a3b4b6e4ef7063efb1e to your computer and use it in GitHub Desktop.
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