You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
394 B
JavaScript
20 lines
394 B
JavaScript
import PropTypes from 'prop-types';
|
|
import classNames from 'classnames';
|
|
|
|
export default function IconComponent(props) {
|
|
const {
|
|
name,
|
|
className,
|
|
...rest
|
|
} = props;
|
|
const cn = classNames(className, `icon icon-${name}`);
|
|
return (
|
|
<span {...rest} className={cn} />
|
|
);
|
|
}
|
|
|
|
IconComponent.propTypes = {
|
|
name: PropTypes.string.isRequired,
|
|
className: PropTypes.string,
|
|
};
|