Skip to content

Instantly share code, notes, and snippets.

@daKmoR
Created April 6, 2020 21:35
Show Gist options
  • Save daKmoR/e31a4c236910db516e28e25a437bb482 to your computer and use it in GitHub Desktop.
Save daKmoR/e31a4c236910db516e28e25a437bb482 to your computer and use it in GitHub Desktop.
Markdium-The evolution of open-wc scoped-elements
import { LitElement, html, css } from 'lit-element';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { FeatureA } from 'feature-a';
import { FeatureB } from 'feature-b';
export class PageA extends ScopedElementsMixin(LitElement) {
static get scopedElements() {
return {
'feature-a': FeatureA,
'feature-b': FeatureB,
}
}
static get styles() {
return css`
:host {
display: block;
padding: 10px;
border: 2px solid #ccc;
}
`;
}
render() {
return html`
<h3>I am page A</h3>
<feature-a></feature-a>
<feature-b></feature-b>
`;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment