Skip to content

Instantly share code, notes, and snippets.

@alexesDev
Last active August 26, 2016 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexesDev/3fe1ff7e67a0a7135c74ba673084551e to your computer and use it in GitHub Desktop.
Save alexesDev/3fe1ff7e67a0a7135c74ba673084551e to your computer and use it in GitHub Desktop.
const FlatIcon = ({ iconName }) => (
<i className={`faticon-${iconName}`} />
)
FlatIcon.propTypes = {
iconName: React.PropTypes.string.isRequired,
};
var FlatIcon = React.createClass({
displayName: "FlatIcon",
propTypes: {
iconName: React.PropTypes.string.isRequired
},
render: function() {
return React.createElement("i", {
"className": "flaticon-" + this.props.iconName
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment