marko-widgets
Version:
Module to support binding of behavior to rendered UI components rendered on the server or client
17 lines • 496 B
JavaScript
module.exports = require('marko-widgets').defineComponent({
template: require.resolve('./template.marko'),
getInitialState: function(input) {
return {
heading: input.heading || '',
message: input.message || '',
colors: input.colors || []
};
},
getTemplateData: function(state, input) {
return {
heading: state.heading,
message: state.message,
colors: state.colors
};
}
});