Update Hover JS fuctions with intative naming

This commit is contained in:
carljbowman 2015-10-14 14:53:40 -06:00
parent 5a8ab315b5
commit c7367967ba

View file

@ -14,9 +14,9 @@ var Hoc = React.createClass({
bgClass: '' bgClass: ''
}; };
}, },
onCardEnter: function (e) { onCardEnter: function (bgClass) {
this.setState({ this.setState({
bgClass: e bgClass: bgClass
}); });
}, },
render: function () { render: function () {
@ -31,20 +31,20 @@ var Hoc = React.createClass({
<div className="card-deck"> <div className="card-deck">
<div className="card"> <div className="card">
<div className="card-info" onMouseEnter={this.onCardEnter.bind(null, 'name-bg')}> <div className="card-info" onMouseEnter={this.onCardEnter.bind(this, 'name-bg')}>
<img src="/images/name-tutorial.jpg" /> <img src="/images/name-tutorial.jpg" />
<a href="/projects/editor/?tip_bar=name"><Button>Animate Your Name</Button></a> <a href="/projects/editor/?tip_bar=name"><Button>Animate Your Name</Button></a>
</div> </div>
</div> </div>
<div className="card" onMouseEnter={this.onCardEnter.bind(null, 'wbb-bg')}> <div className="card" onMouseEnter={this.onCardEnter.bind(this, 'wbb-bg')}>
<div className="card-info"> <div className="card-info">
<img src="/images/hide-seek-tutorial.jpg" /> <img src="/images/hide-seek-tutorial.jpg" />
<a href="/hide"><Button> Hide-and-Seek Game</Button></a> <a href="/hide"><Button> Hide-and-Seek Game</Button></a>
</div> </div>
</div> </div>
<div className="card" onMouseEnter={this.onCardEnter.bind(null, 'dance-bg')}> <div className="card" onMouseEnter={this.onCardEnter.bind(this, 'dance-bg')}>
<div className="card-info"> <div className="card-info">
<img src="/images/dance-tutorial.jpg" /> <img src="/images/dance-tutorial.jpg" />
<a href="/projects/editor/?tip_bar=dance"><Button>Dance, Dance, Dance</Button></a> <a href="/projects/editor/?tip_bar=dance"><Button>Dance, Dance, Dance</Button></a>