Skip to content

Instantly share code, notes, and snippets.

@kennethkoontz
Created June 27, 2018 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennethkoontz/52d1015ae4337eccd5527c042274e9bf to your computer and use it in GitHub Desktop.
Save kennethkoontz/52d1015ae4337eccd5527c042274e9bf to your computer and use it in GitHub Desktop.
import React from 'react';
import '../../../assets/icons.svg';
import './icons.css';
const defaultDimensions = '32';
const Icon = props => (
<svg
width={props.width || defaultDimensions}
height={props.height || defaultDimensions}
className={`icon icon-${props.name}`}
>
<use xlinkHref={`#icon-${props.name}`} />
</svg>
);
export default Icon;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment