Last active
October 23, 2018 08:25
-
-
Save kilgarenone/10cc5d2a898e72db7be91366520c53f4 to your computer and use it in GitHub Desktop.
<Icon />`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { css, cx } from "react-emotion"; | |
const defaultSvgCss = css` | |
position: relative; | |
display: inline-block; | |
vertical-align: middle; | |
`; | |
function Icon({ icon, color, size = 24, className }) { | |
return ( | |
<svg | |
className={cx("icon", defaultSvgCss, className)} | |
width={size} | |
height={size} | |
viewBox="0 0 24 24" | |
fill="currentColor" | |
preserveAspectRatio="xMidYMid meet" | |
> | |
<path className="icon-path" fill={color} d={icon} /> | |
</svg> | |
); | |
} | |
export default Icon; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment