Add className prop to Icon
This commit is contained in:
parent
f8c77a96cc
commit
84464a8118
1 changed files with 3 additions and 1 deletions
|
@ -4,9 +4,11 @@ var Icon = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
style: React.PropTypes.object,
|
style: React.PropTypes.object,
|
||||||
fixed: React.PropTypes.bool,
|
fixed: React.PropTypes.bool,
|
||||||
|
className: React.PropTypes.string,
|
||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
var className = 'icon ' + ('fixed' in this.props ? 'icon-fixed-width ' : '') + this.props.icon;
|
var className = ('icon ' + ('fixed' in this.props ? 'icon-fixed-width ' : '') + this.props.icon + ' ' +
|
||||||
|
(this.props.className || ''));
|
||||||
return <span className={className} style={this.props.style}></span>
|
return <span className={className} style={this.props.style}></span>
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue