mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-10-30 16:20:24 +01:00
refactor(starter): upgrade to new version of gatsby
This commit is contained in:
20
src/components/Icon/Icon.tsx
Normal file
20
src/components/Icon/Icon.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from "react";
|
||||
|
||||
import styles from "./Icon.module.scss";
|
||||
|
||||
interface Props {
|
||||
name: string;
|
||||
icon: {
|
||||
path?: string;
|
||||
viewBox?: string;
|
||||
};
|
||||
}
|
||||
|
||||
const Icon: React.FC<Props> = ({ name, icon }: Props) => (
|
||||
<svg className={styles.icon} viewBox={icon.viewBox}>
|
||||
<title>{name}</title>
|
||||
<path d={icon.path} />
|
||||
</svg>
|
||||
);
|
||||
|
||||
export default Icon;
|
||||
Reference in New Issue
Block a user