/*
 * @Author: codingfly
 * @Description:
 * @Date: 2021-08-11 08:32:39
 * @LastEditTime: 2021-09-08 14:52:20
 * @FilePath: \annar-master\components\icon\index.tsx
 */
import * as React from 'react';
import { View } from 'remax/one';
import { addUnit } from './../_utils';
import classNames from 'classnames';
import { getPrefixCls } from './../common';
var prefixCls = getPrefixCls('icon');

var Icon = function Icon(props) {
  var type = props.type,
      dot = props.dot,
      info = props.info,
      color = props.color,
      size = props.size,
      style = props.style,
      className = props.className;
  return /*#__PURE__*/React.createElement(View, {
    className: classNames(className, prefixCls, 'iconfont', "icon-".concat(type)),
    style: Object.assign(Object.assign({}, style), {
      color: color,
      fontSize: addUnit(size)
    })
  }, dot && /*#__PURE__*/React.createElement(View, {
    className: "".concat(prefixCls, "-info ").concat(prefixCls, "-info--dot")
  }), info && /*#__PURE__*/React.createElement(View, {
    className: "".concat(prefixCls, "-info")
  }, info));
};

export default Icon;