0.2.4 • Published 6 years ago

polymer-lit v0.2.4

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

npm.io npm.io npm.io npm.io npm.io npm.io npm.io

DEPRECATED: Since the orignial LitElement now works as the alternative to the Polymer base class, I won't continue this Mixin which does the same :) Please use the https://github.com/Polymer/lit-element in your projects!

Polymer Lit-HTML Mixin

Mixin for Polymer which gives you ability to render your element with lit-html, it's based on the original polymer-lit repository, but it's goal to work with polymer and not decorate an HTMLElement.

Installation

yarn add polymer-lit

Usage for Polymer 3.x

import {Element as PolymerElement} from '/node_modules/@polymer/polymer/polymer-element.js';
import {Lit} from '/node_modules/polymer-lit/polymer-lit.js';
import {html} from '/node_modules/lit-html/lit-html.js';

class MyElement extends Lit(PolymerElement)
{
    static get properties() { return {
        // ...
    }};

    render() {
        return html`
            <style>:host { display: block; }</style>
            <slot></slot>
        `;
    }
}

customElements.define('my-element', MyElement);
0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago