3.0.0 • Published 11 months ago

@scopedelement/matarial-web v3.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

Material Web

This is a fork of Material web in its newest version. This repository uses Scoped Custom Element to make sure that components are side-effect free and as such can be used in deistributed application better.

Breaking Change to fork

This changes requires the Scoped CustomElementRegistry polyfill .

Usage

import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
import { MdFilledTextField } from '@scoped-material/matarial-web/textfield/MdFilledTextField.js';

class MyElement extends ScopedElementsMixin(LitElement) {
  static scopedElements = {
    'md-filled-text-field': MdFilledTextField,
  };

  constructor() {
    super();
    this.attachShadow({ mode: 'open' });
  }

  connectedCallback() {
    this.shadowRoot.innerHTML = '<md-filled-text-field>click</md-filled-text-field>';
  }
}