nibit-portable

0.1.12 • Public • Published

NibitPortable a React.JS algorithm creator based on js.bit

This is a includable version of https://nibit.chemisax.com

install

npm i --save nibit-portable

usage

<NibitPortable
    blocks={this.state.blocks}
    onChange={blocks => this.setState({blocks})}
    config={config}
/>

block format

[
    {
        type: 'block_type',
        params: {
            param1: 'value',
            param2: 'value'
        }
    },
]

config format

[
    {
        name: 'Block Name',
        type: 'block_type',
        description: 'This is the block description',
        color: '#ffffff',
        textColor: '#000000',
        params: [
            {
                name: 'param1',
                label: 'Param 1',
                type: 'text',
                default: 'placeholder'
            },
            {
                name: 'param2',
                label: 'Param 2',
                type: 'pulldown',
                options: [
                    {
                        label: 'Option 1',
                        value: 'option1'
                    },
                    {
                        label: 'Option 2',
                        value: 'option2'
                    }
                ]
            }
        ]
    },
]

Package Sidebar

Install

npm i nibit-portable

Weekly Downloads

2

Version

0.1.12

License

MIT

Last publish

Collaborators

  • chemisax