1.0.3 • Published 6 years ago

dna-element v1.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

⚕️ DnaElement

A tiny back store for apps using webcomponents (Polymer).

installation

$ yarn add dna-element

usage

import { DnaElement, html } from 'dna-element'

class MyApp extends DnaElement {

    constructor() {
        super();

        this.setData('appMainColor', 'red');
    }

    static get template() {
        return html`
            <h1 style="color:{{data.appMainColor}}">My App</h1>
        `
    }
}

...

class DashBoard extends DnaElement {
    static get template() {
        return html`
            <p>Current App Color is : {{data.appMainColor}}</p>
        `;
    }
}

...

run the demo

$ git clone https://github.com/vdegenne/dna-element.git
$ cd dna-element
$ cd yarn run serve

and access http://localhost:8000/demo (change the port if polymer couldn't use 8000 by default)

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago