0.7.0 • Published 9 years ago

bemreact v0.7.0

Weekly downloads
3
License
WTFPL
Repository
github
Last release
9 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

9 years ago

0.6.0

9 years ago

0.5.3

9 years ago

0.5.2

9 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago