import _defineProperty from "@babel/runtime/helpers/defineProperty";
import React, { memo, useCallback } from 'react';
import classNames from 'classnames';
import Icon from '../icon';

var IconItem = function IconItem(props) {
  var prefixCls = props.prefixCls,
      type = props.type,
      onSelect = props.onSelect,
      active = props.active,
      customFontName = props.customFontName;
  var handleClick = useCallback(function () {
    onSelect(type);
  }, [type, onSelect]);
  return /*#__PURE__*/React.createElement("li", {
    className: classNames(_defineProperty({}, "".concat(prefixCls, "-item-selected"), active))
  }, /*#__PURE__*/React.createElement("div", {
    onClick: handleClick
  }, /*#__PURE__*/React.createElement(Icon, {
    customFontName: customFontName,
    type: type
  }), /*#__PURE__*/React.createElement("p", null, type)));
};

IconItem.displayName = 'IconItem';
export default /*#__PURE__*/memo(IconItem);
//# sourceMappingURL=IconItem.js.map
