UNPKG

thinkful-ui

Version:

Shared navigation and UI resources for Thinkful.

19 lines (16 loc) 398 B
const React = require('react'); /** * Icon * @property {String} name the icon class to use */ class Icon extends React.Component { static propTypes = { name: React.PropTypes.string.isRequired } render() { return <span aria-hidden="true" className={`icon-${this.props.name} ${this.props.className || ''}`}/> } } module.exports = {Icon};