am trying to dynamically import an icon from react-icons-kit and its throwing this error :
Module not found: Can't resolve 'enzyme' in 'G:\my-app\node_modules\react-icons-kit'
I have been trying for an hour and nothing.
My code :
import React from 'react';
import { Icon } from 'react-icons-kit';
const Button = ({ icon = 'home', library = "fa", children, ...props }) => {
if (icon) {
var svg = require('react-icons-kit/' + library + '/' + icon);
}
return (
<button className={classes} {...props}>
{children}
<Icon icon={svg}/>
</button>
);
};
export default Button;
what am I missing?