How to use the hybrids.property function in hybrids

To help you get started, we’ve selected a few hybrids examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vogloblinsky / web-components-benchmark / todomvc / hybrids / js / todo-item.js View on Github external
} from 'hybrids';

const onchange = (host, event) => {
    dispatch(host, 'checked', {
        detail: parseInt(host.index)
    });
};

const onclick = (host, event) => {
    dispatch(host, 'removed', {
        detail: parseInt(host.index)
    });
};

const TodoItem = {
    text: property('text'),
    checked: property('checked'),
    index: property('index'),
    render: ({
        text
    }) => html `
    <style>
    :host {
        display: block;
    }

    li.item {
        font-size: 24px;
        display: block;
        position: relative;
        border-bottom: 1px solid #ededed;
    }</style>
github vogloblinsky / web-components-benchmark / todomvc / hybrids / js / todo-item.js View on Github external
const onchange = (host, event) =&gt; {
    dispatch(host, 'checked', {
        detail: parseInt(host.index)
    });
};

const onclick = (host, event) =&gt; {
    dispatch(host, 'removed', {
        detail: parseInt(host.index)
    });
};

const TodoItem = {
    text: property('text'),
    checked: property('checked'),
    index: property('index'),
    render: ({
        text
    }) =&gt; html `
    <style>
    :host {
        display: block;
    }

    li.item {
        font-size: 24px;
        display: block;
        position: relative;
        border-bottom: 1px solid #ededed;
    }
</style>
github vogloblinsky / web-components-benchmark / todomvc / hybrids / js / todo-item.js View on Github external
const onchange = (host, event) =&gt; {
    dispatch(host, 'checked', {
        detail: parseInt(host.index)
    });
};

const onclick = (host, event) =&gt; {
    dispatch(host, 'removed', {
        detail: parseInt(host.index)
    });
};

const TodoItem = {
    text: property('text'),
    checked: property('checked'),
    index: property('index'),
    render: ({
        text
    }) =&gt; html `
    <style>
    :host {
        display: block;
    }

    li.item {
        font-size: 24px;
        display: block;
        position: relative;
        border-bottom: 1px solid #ededed;
    }

    li.item input {</style>

hybrids

A JavaScript framework for creating fully-featured web applications, components libraries, and single web components with unique declarative and functional architecture

MIT
Latest version published 2 months ago

Package Health Score

85 / 100
Full package analysis