index.js 424 B

1234567891011121314151617
  1. import React from 'react';
  2. import './index.less';
  3. function GIcon(props) {
  4. const { className, active, name, noHover, onClick, children } = props;
  5. return (
  6. <div
  7. className={`icon ${className || ''} ${name} ${active ? 'active' : ''} ${noHover ? 'no' : ''}`}
  8. onClick={() => onClick && onClick()}
  9. >
  10. {children}
  11. </div>
  12. );
  13. }
  14. GIcon.propTypes = {};
  15. export default GIcon;
  16. export const Icon = GIcon;