Icon component

This commit is contained in:
Max Lynch
2020-12-22 17:27:45 -06:00
parent 5e2bd30d72
commit 91ca416c9f
12 changed files with 132 additions and 34 deletions
+19
View File
@@ -0,0 +1,19 @@
import classNames from 'classnames';
const Icon = ({ icon, ...props }) => {
const svg = icon.replace('data:image/svg+xml;utf8,', '');
return (
<div
{...props}
className={classNames('ui-icon', {
'ion-icon': true,
'ion-color': true,
[props.className]: true,
})}
>
<div className="icon-inner" dangerouslySetInnerHTML={{ __html: svg }} />
</div>
);
};
export default Icon;