Footer is a component to build user interface, an instance of Component module.
npm install mag-component-footer
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 () {}
}
});
There is a global var
DEVELOP
which 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-footer
is released under the MIT License.