Layout is a component to build user interface, an instance of Component module.
npm install mag-component-layoutAdd the constructor to the scope:
var Layout = require('mag-component-layout');Create layout instance:
var layout = new Layout({
data: [
'Some text',
{
className: 'icon star',
name: '$starIcon'
},
{
value: new Button({value:'Ok'}),
name: 'okButton'
},
new Button({value:'Cancel'})
]
});There is a global var
DEVELOPwhich activates additional consistency checks and protection logic not available in release mode.
If you have any problems or suggestions please open an issue according to the contribution rules.
mag-component-layout is released under the MIT License.