Footer component
Footer is a component to build user interface, an instance of Component module.
Installation
npm install mag-component-footer
Usage
Add the constructor to the scope:
var Footer = require('mag-component-footer');
Create instance with custom config:
var footer = new Footer({
parent: page,
data: {
left: {
code: keys.menu, action: function () {}
},
middle: [
{
code: 55,
action: function () {}
},
{
code: keys.f1,
title: 'stop',
action: function () {}
},
{
code: 9000,
className: 'customIcon',
title: 'start',
action: function () {}
},
{
code: keys.f4,
title: 'end',
action: function () {}
}
],
right: {
code: 65,
action: function () {}
}
}
});
To change footer after creation:
footer.init({
left: {
code: keys.menu,
action: function () {}
},
middle: [
{
code: 55,
action: function () {}
},
{
code: keys.f1,
title: 'stop',
action: function () {}
},
{
code: 9000,
className: 'customIcon',
title: 'start',
action: function () {}
},
{
code: keys.f4,
title: 'end',
disabled: true
}
],
right: {
code: 65, action: function () {}
}
});
Development mode
There is a global var
DEVELOP
which activates additional consistency checks and protection logic not available in release mode.
Contribution
If you have any problems or suggestions please open an issue according to the contribution rules.
License
mag-component-footer
is released under the MIT License.