0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 10:52:46 +00:00

Setupping up the basic components

This commit is contained in:
Scott Tolksdorf
2016-05-14 18:49:49 -04:00
parent 92e110ba15
commit ec968f47da
10 changed files with 286 additions and 8 deletions

View File

@@ -0,0 +1,32 @@
var React = require('react');
var _ = require('lodash');
var cx = require('classnames');
var Sorter = React.createClass({
getDefaultProps: function() {
return {
spells : []
};
},
renderSpell : function(spell){
return <div className='spell' key={spell.id}>
{spell.name}
</div>
},
renderSpells : function(){
return _.map(this.props.spells, (spell)=>{
return this.renderSpell(spell)
});
},
render : function(){
return <div className='sorter'>
{this.renderSpells()}
</div>
}
});
module.exports = Sorter;