fix: swap out svg plugin causing node 12 failures (#2710)

This commit is contained in:
Shawn Erquhart
2019-09-30 11:52:26 -04:00
committed by GitHub
parent 4ae8c803d4
commit 5dc7ee2a9c
5 changed files with 80 additions and 156 deletions

View File

@ -51,14 +51,19 @@ const sizes = {
large: '32px',
};
const Icon = ({ type, direction, size = 'medium', className }) => (
<IconWrapper
className={className}
dangerouslySetInnerHTML={{ __html: icons[type].image }}
size={sizes[size] || size}
rotation={getRotation(icons[type].direction, direction)}
/>
);
const Icon = ({ type, direction, size = 'medium', className }) => {
const IconSvg = icons[type].image;
return (
<IconWrapper
className={className}
size={sizes[size] || size}
rotation={getRotation(icons[type].direction, direction)}
>
<IconSvg />
</IconWrapper>
);
};
Icon.propTypes = {
type: PropTypes.string.isRequired,