UNPKG

398 BJSXView Raw
1const React = require('react');
2
3/**
4 * Icon
5 * @property {String} name the icon class to use
6 */
7class Icon extends React.Component {
8 static propTypes = {
9 name: React.PropTypes.string.isRequired
10 }
11
12 render() {
13 return <span
14 aria-hidden="true"
15 className={`icon-${this.props.name} ${this.props.className || ''}`}/>
16 }
17}
18
19module.exports = {Icon};
\No newline at end of file