mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
17 lines
503 B
JavaScript
17 lines
503 B
JavaScript
module.exports = require('marko/widgets/legacy').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
|
|
};
|
|
}
|
|
}); |