Sha256: ede558fe8d4a4f1837d2d3bfb75edabbde8c5b0963dda2dd6c5326af3e260cbe
Contents?: true
Size: 939 Bytes
Versions: 44
Compression:
Stored size: 939 Bytes
Contents
var React = require('react'); var Mui = require('material-ui'); var FloatingActionButton_ = require('./material-ui/floating-action-button_.jsx'); /** * @prop type * @prop selectedChannel * @prop onAddedChannel * @prop onRemovedChannel */ var ContextButton = React.createClass({ addChannel: function() { this.props.onAddedChannel(this.props.selectedChannel.id); }, removeChannel: function() { this.props.onRemovedChannel(this.props.selectedChannel.id); }, render: function() { var button = this.props.type==='add'? <FloatingActionButton_ icon='content-add' secondary={true} onTouchTap={this.addChannel} /> : <FloatingActionButton_ icon='content-remove' primary={true} onTouchTap={this.removeChannel} />; return ( <div className='div-button-container'> {button} </div> ); } }); module.exports = ContextButton;
Version data entries
44 entries across 44 versions & 1 rubygems