Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
feat(Icon): Allow styles to be passed
Browse files Browse the repository at this point in the history
  • Loading branch information
kylealwyn committed Sep 5, 2018
1 parent 92124b9 commit dccf950
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Icon/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ class Icon extends React.Component {
}

render() {
const { name, size, color } = this.props;
const { name, size, color, style = {}, className = '' } = this.props;
const { iconPrefix } = this.constructor;

return (
<StyledIcon
{...this.props}
className={`${iconPrefix} ${iconPrefix}-${name}`}
style={{ fontSize: size, color: color || 'inherit' }}
className={`${iconPrefix} ${iconPrefix}-${name} ${className}`}
style={{ fontSize: size, color: color || 'inherit', ...style }}
/>
);
}
Expand Down

0 comments on commit dccf950

Please sign in to comment.