var React = require('react'); var _ = require('lodash'); var cx = require('classnames'); var Logo = require('naturalCrit/logo/logo.jsx'); var Statusbar = React.createClass({ getDefaultProps: function() { return { editId: null, shareId : null, isPending : false, info : null }; }, renderInfo : function(){ //render last update? //number of times viewed? }, renderNewButton : function(){ if(this.props.editId) return null; return New }, renderLinks : function(){ if(!this.props.editId) return null; return [
Edit Link
,
Share Link
] }, renderStatus : function(){ if(!this.props.editId) return null; var text = 'Saved.' if(this.props.isPending){ text = 'Saving...' } return
{text}
}, render : function(){ console.log(this.props); return
Statusbar Ready!
{this.renderLinks()} {this.renderStatus()} {this.renderNewButton()}
} }); module.exports = Statusbar;