Instantly share code, notes, and snippets.

Behnood Eghbali behnood-eghbali

  • Tehran, Iran
View GitHub Profile
@behnood-eghbali
behnood-eghbali / Icon.js
Created Aug 12, 2018
Creating an SVG Icon System with React
View Icon.js
import React, { Component } from 'react';
import PropTypes from 'prop-types';
class StarIcon extends Component {
render() {
const {color, width, height} = this.props;
return (
<svg className="star" width={width} height={height} fill={color} viewBox="0 0 200 200">
<path d="M100,10 L150,140 20,50 180,50 50,140 Z" />
</svg>