Sha256: f594fa95f66ae09071d2c992c88c295ecbb8531773043eb0c3ce6c50460b83f7
Contents?: true
Size: 799 Bytes
Versions: 31
Compression:
Stored size: 799 Bytes
Contents
import * as React from "react"; import assetUrl from "../support/asset_url"; interface IconProps { name: string; iconExtraClassName?: string; } export const Icon: React.SFC<IconProps> = ({ name, iconExtraClassName }) => { return ( <svg className={`icon ${iconExtraClassName} ${name}`}> <use xmlnsXlink="http://www.w3.org/1999/xlink" xlinkHref={`${assetUrl("icons.svg")}#${name}`} /> </svg> ); }; Icon.defaultProps = { iconExtraClassName: "icon--before" }; interface IconWithoutUserAgentProps { name: string; iconExtraClassName?: string; } const IconWithoutUserAgent: React.SFC<IconWithoutUserAgentProps> = ({ name, iconExtraClassName }) => <Icon name={name} iconExtraClassName={iconExtraClassName} />; export default IconWithoutUserAgent;
Version data entries
31 entries across 31 versions & 1 rubygems