1
Fork 0

Added template for dynamic projects component

This commit is contained in:
Jake Howard 2015-11-10 09:26:18 +00:00
parent 60260ada94
commit ac360f4544

View file

@ -1,14 +1,37 @@
var React = require('react');
const projectData = [
{key: 1, title: "College", info: "", link: ""}
{key: 2, title: "Personal", info: "", link: ""}
{key: 3, title: "Work", info: "", link: ""}
];
var projectImages = React.createClass({
getInitialState: function () {
return {
hover: 0,
};
},
setHovering: function (key, evt) {
this.setState({hover: key});
},
render: function () {
var isHovered;
var projectTiles = projectData.map(function (project) {
isHovered = (project.key == this.state.hover);
return (
<div className="col-sm-4">
</div>
);
});
return (
<div className="container">
<div className="panel panel-default">
<div className="panel-body row">
<div className="col-xs-4">
<p>things</p>
</div>
{ projectTiles }
</div>
</div>
</div>