UNPKG

@holokit/icons

Version:

Components, fonts, icons, and css files for creating and displaying icons.

26 lines (19 loc) 493 B
import React from 'react' import PropTypes from 'prop-types' import { icons } from '../../complexicons' const ComplexIcon = ({ name, svgProps }) => !icons[name] ? null : <div className="hk-complexicon">{icons[name](svgProps)}</div> ComplexIcon.defaultProps = { svgProps: {}, } ComplexIcon.propTypes = { /* * Name of the icon to show */ name: PropTypes.string, /** * Props to be applied to the SVG icon. */ svgProps: PropTypes.object, } export default ComplexIcon