mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
13 lines
222 B
JavaScript
13 lines
222 B
JavaScript
module.exports = {
|
|
onInput: function (input) {
|
|
this.state = {
|
|
colors: input.colors || [],
|
|
};
|
|
},
|
|
|
|
addColor: function (color) {
|
|
this.state.colors.push(color);
|
|
this.setStateDirty("color");
|
|
},
|
|
};
|