Created
April 6, 2020 21:35
-
-
Save daKmoR/e31a4c236910db516e28e25a437bb482 to your computer and use it in GitHub Desktop.
Markdium-The evolution of open-wc scoped-elements
This file contains hidden or 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
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