Sha256: 5d2c943f86fbbb99aa3d52f352aead38b89c10201201b717327d88ada5ee23e5
Contents?: true
Size: 1010 Bytes
Versions: 12
Compression:
Stored size: 1010 Bytes
Contents
// <IconBarItem type="FontAwesome" icon="cog" /> Rev.registerComponent('IconBarItem', class IconBarItem extends React.Component { static get propTypes() { return { icon: React.PropTypes.string, type: React.PropTypes.string, } } render() { const classes = { 'item': true, 'RevIconBarItem': true, } return ( <a {...this.props} className={this.classAdd(classes)}> {this.renderIcon()} <label className="RevIconBarItem-label">{this.props.children}</label> </a> ) } renderIcon() { const classNameObject = { 'RevIconBarItem-icon': true, } if(this.props.icon) { return ( <Rev.Components.Icon type={this.props.type} icon={this.props.icon} className={this.classAdd(classNameObject)} /> ) } if(this.props.src) { return ( <img src={this.props.src} className={this.classAdd(classNameObject)} /> ) } return null } })
Version data entries
12 entries across 12 versions & 1 rubygems