rickvanlieshout.com/src/components/Icon/Icon.js
2019-07-31 22:05:23 -04:00

21 lines
361 B
JavaScript

// @flow strict
import React from 'react';
import styles from './Icon.module.scss';
type Props = {
name: string,
icon: {
viewBox?: string,
path?: string
}
};
const Icon = ({ name, icon }: Props) => (
<svg className={styles['icon']} viewBox={icon.viewBox}>
<title>{name}</title>
<path d={icon.path} />
</svg>
);
export default Icon;