0.7.0 • Published 10 years ago

bemreact v0.7.0

Weekly downloads
3
License
WTFPL
Repository
github
Last release
10 years ago

bemreact

npm travis climate gratipay

Convert bemjson into React elements. Work in progress.

Install

$ npm i -S bemreact

Usage

var BemReact = require('bemreact');

var Button = BemReact.createClass({
    render: function() {
        return {
            block: 'button',
            tag: 'button',
            mods: {
                size: this.props.size,
                disabled: this.props.disabled
            },
            props: {
                disabled: this.props.disabled
            },
            content: [
                {
                    elem: 'icon',
                    mods: {
                        type: 'button'
                    }
                }, {
                    elem: 'text',
                    content: 'ololo'
                }
            ]
        }
    }
});

License

WTFPL

0.7.0

10 years ago

0.6.0

10 years ago

0.5.3

10 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago