0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-18 10:02:49 +00:00

Polishing the sidebar so more

This commit is contained in:
Scott Tolksdorf
2015-11-16 14:22:00 -05:00
parent e6e87457da
commit 5918267c86
10 changed files with 152 additions and 154 deletions

View File

@@ -131,13 +131,10 @@ var MonsterCard = React.createClass({
var self = this;
var usedItems = this.state.usedItems.slice(0);
return _.map(this.props.items, function(item, index){
var used = _.contains(usedItems, item);
if(used){
usedItems.splice(usedItems.indexOf(item), 1);
}
return <span
key={index}
className={cx({'used' : used})}
@@ -174,11 +171,13 @@ var MonsterCard = React.createClass({
{this.renderSpells()}
</div>
<div className='abilitiesContainer'>
{this.props.abilities}
</div>
<div className='itemContainer'>
<i className='fa fa-flask' />
{this.renderItems()}
</div>
</div>
);
}