rickvanlieshout.com/src/components/Icon/Icon.js

21 lines
361 B
JavaScript
Raw Normal View History

2019-08-01 04:05:23 +02:00
// @flow strict
2018-11-09 18:08:48 +01:00
import React from 'react';
import styles from './Icon.module.scss';
2019-05-10 01:15:43 +02:00
type Props = {
name: string,
2019-05-10 01:15:43 +02:00
icon: {
viewBox?: string,
path?: string
}
};
const Icon = ({ name, icon }: Props) => (
2018-11-09 18:08:48 +01:00
<svg className={styles['icon']} viewBox={icon.viewBox}>
<title>{name}</title>
2018-11-09 18:08:48 +01:00
<path d={icon.path} />
</svg>
);
export default Icon;