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.
Hydro/packages/ui-default/components/react/IconComponent.jsx

20 lines
394 B
JavaScript

import classNames from 'classnames';
import PropTypes from 'prop-types';
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,
};