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
class Page {} | |
class PageRed extends Page {} | |
class PageGreen extends Page {} | |
class PageBlue extends Page {} |
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
class Page {} | |
class PageRed extends Page {} | |
class PageGreen extends Page {} | |
class PageBlue extends Page {} | |
class LoggedPagRed extends PageRed {} |
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 { isIE11 } from './helpers.js'; | |
if (isIE11()) {} |
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
npm i @open-wc/dedupe-mixin |
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 { dedupeMixin } from '@open-wc/dedupe-mixin'; | |
export const MyMixin = dedupeMixin( | |
superclass => | |
class MyMixin extends superclass { | |
// your mixin code goes here | |
}, | |
); |
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 } from 'lit-element'; | |
import { ScopedElementsMixin } from '@open-wc/scoped-elements'; | |
import { MyPanel } from './MyPanel.js'; | |
| |
export class MyElement extends ScopedElementsMixin(LitElement) { | |
static get scopedElements() { | |
return { | |
'my-panel': MyPanel, | |
}; | |
} |
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, |
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 } from 'lit-element'; | |
import { ScopedElementsMixin } from '@open-wc/scoped-elements'; | |
import { MyPanel } from './MyPanel.js'; | |
| |
export class MyElement extends ScopedElementsMixin(LitElement) { | |
static get scopedElements() { | |
return { | |
'my-panel': MyPanel, | |
}; | |
} |
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
{ | |
html: '<h1>This is my component</h1><my-component></my-component>', | |
jsCode: "import './my-component.js';", | |
stories: [ | |
key: 'demo', | |
name: 'demo', | |
code: 'export const demo = () => `<my-component header="from attribute"></my-component>`', | |
] | |
} |
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
const { mdjsTransformer } = require('@mdjs/core'); | |
module.exports = { | |
nodeResolve: true, | |
open: 'README.md', | |
watch: true, | |
responseTransformers: [mdjsTransformer], | |
}; |