1234567891011121314151617 |
- import React from 'react';
- import './index.less';
- function GIcon(props) {
- const { className, active, name, noHover, onClick, children } = props;
- return (
- <div
- className={`icon ${className || ''} ${name} ${active ? 'active' : ''} ${noHover ? 'no' : ''}`}
- onClick={() => onClick && onClick()}
- >
- {children}
- </div>
- );
- }
- GIcon.propTypes = {};
- export default GIcon;
- export const Icon = GIcon;
|