Sha256: 699b6690f14d6bab64b16b679240b8999af2ce74e9f4e545b0bdf2ef568feafa
Contents?: true
Size: 467 Bytes
Versions: 2
Compression:
Stored size: 467 Bytes
Contents
import { PropTypes } from 'react'; import assetUrl from '../support/asset_url'; const Icon = ({ name }) => { if (navigator.userAgent.match(/PhantomJS/)) { return <span>{name}</span>; } return ( <svg className={`icon icon--before ${name}`}> <use xmlnsXlink="http://www.w3.org/1999/xlink" xlinkHref={`${assetUrl('icons.svg')}#${name}`} /> </svg> ); }; Icon.propTypes = { name: PropTypes.string.isRequired }; export default Icon;
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
decidim-comments-0.0.1 | app/frontend/application/icon.component.jsx |
decidim-0.0.1 | decidim-comments/app/frontend/application/icon.component.jsx |