react-zeanium-ui-ui
Version:
Zeanium UI Framework for React.js
43 lines (39 loc) • 949 B
JavaScript
require('./ToolBar.less');
var React = require('react');
var ButtonGroup = require('./ButtonGroup');
module.exports = React.createClass({
displayName: 'ToolBar',
getDefaultProps: function (){
return {
style: {}
};
},
getInitialState: function (){
return {
};
},
componentDidMount:function(){
},
__onClick: function (event){
this.props.onClick && this.props.onClick(this.props, event);
},
render:function(){
var _style = this.props.style;
_style.lineHeight = this.props.height + 'px';
return (
<div className={"c-toolbar " + this.props.className} style={_style} >
<div className="c-toolbar-title" >
{
this.props.icon && <span className={"icon fa " + this.props.icon}></span>
}
{
this.props.title && <span className="title">{this.props.title}</span>
}
</div>
<ButtonGroup {...this.props} float="right" >
{this.props.children}
</ButtonGroup>
</div>
);
}
});