mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
26 lines
494 B
JavaScript
26 lines
494 B
JavaScript
module.exports = require('marko/components/legacy').defineComponent({
|
|
template: require.resolve('./template.marko'),
|
|
|
|
getComponentConfig: function() {
|
|
return {
|
|
type: 'component config'
|
|
};
|
|
},
|
|
|
|
getInitialState: function() {
|
|
return {
|
|
type: 'component state'
|
|
};
|
|
},
|
|
|
|
getTemplateData: function(state, input) {
|
|
return {
|
|
name: input.name,
|
|
messageCount: input.messageCount
|
|
};
|
|
},
|
|
|
|
init: function(componentConfig) {
|
|
this.componentConfig = componentConfig;
|
|
}
|
|
}); |