46cc86c80c0f2a7eaff2029b99c3963178c44edfb0a186317fbd5d69b184fb0f48dc0350dd0aa031889aad8a1a52f360481b9f09a0509c4390d29db5ec1805 353 B

123456789101112131415161718
  1. import React, {PureComponent} from 'react';
  2. export default class Icon extends PureComponent {
  3. render() {
  4. const {className, glyph, ...restProps} = this.props;
  5. return (
  6. <svg className={className} {...restProps}>
  7. <use xlinkHref={`#${glyph}`} />
  8. </svg>
  9. );
  10. }
  11. }
  12. Icon.defaultProps = {
  13. glyph: '',
  14. className: 'icon'
  15. };