1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 10x 25x 10x | import styles from './style.postcss'; import React from 'react'; import classnames from 'classnames'; import PropTypes from 'prop-types'; const InlineSvg = ({ children, className, title, onClick }) => <i className={classnames(className, styles.InlineSvg)} dangerouslySetInnerHTML={{ __html: children }} title={title} onClick={onClick} />; InlineSvg.propTypes = { children: PropTypes.string, className: PropTypes.string, title: PropTypes.string, onClick: PropTypes.func, }; export default InlineSvg; |