mirror of
				https://github.com/mastermindzh/rickvanlieshout.com
				synced 2025-10-31 08:40:27 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			418 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			418 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import React from "react";
 | |
| 
 | |
| import * as styles from "./Icon.module.scss";
 | |
| import { ICONS } from "@/constants";
 | |
| 
 | |
| interface Props {
 | |
|   name: keyof typeof ICONS;
 | |
|   icon: {
 | |
|     viewBox?: string;
 | |
|     path?: 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;
 |