41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
var React = require('react');
|
|
|
|
|
|
var AddToCart = React.createClass({
|
|
|
|
render: function() {
|
|
return (
|
|
<div className="row-fluid add-to-cart">
|
|
<div className="col-xs-offset-1 col-xs-1"><button className="btn btn-success">+</button></div>
|
|
<div className="col-xs-1"><button className="btn"> 2 </button></div>
|
|
<div className="col-xs-1"><button className="btn btn-success">-</button></div>
|
|
<div className="col-xs-8"><button className="btn btn-warning">U korpu</button></div>
|
|
</div>
|
|
);
|
|
},
|
|
|
|
// Add change listeners to stores
|
|
componentDidMount: function() {
|
|
/*ItemActions.loadFrontPageItems();
|
|
ItemStore.addChangeListener(this._onChange); */
|
|
},
|
|
|
|
|
|
getInitialState: function() {
|
|
return {
|
|
//items: ItemStore.getItems()
|
|
}
|
|
},
|
|
|
|
|
|
_onChange: function () {
|
|
if (this.isMounted()) {
|
|
/* this.setState({
|
|
items: ItemStore.getItems()
|
|
}); */
|
|
}
|
|
},
|
|
});
|
|
|
|
module.exports = AddToCart;
|