import React from 'react'; import { IconWrapper, ClickZone, } from './styled'; import data from './data'; type Props = { id?: string; glyph: string; onClick?: () => void; onBlur?: () => void; style?: {}; isActive? : boolean; }; const Icon: React.FunctionComponent = ({ glyph, id = '', onClick, onBlur, style, isActive = false, }: Props) => { const { Normal, Hover, } = data[glyph]; return ( {Normal && } {Hover && } {isActive && Hover ? : null} ); }; export default Icon;