nci/static/js/app/components/projects/item.js

20 lines
419 B
JavaScript
Raw Normal View History

2015-05-03 23:04:51 +00:00
'use strict';
define([
2015-05-09 21:36:17 +00:00
'react', 'app/actions/project', 'templates/app/components/projects/item',
2015-05-07 20:53:46 +00:00
], function(React, ProjectActions, template) {
2015-05-03 23:04:51 +00:00
var Component = React.createClass({
2015-05-07 20:53:46 +00:00
onProjectSelect: function(projectName) {
ProjectActions.run(projectName)
},
2015-05-03 23:04:51 +00:00
render: function() {
return template({
2015-05-07 20:53:46 +00:00
item: this.props.item,
onProjectSelect: this.onProjectSelect
2015-05-03 23:04:51 +00:00
});
}
});
return Component;
});