1 | import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2 | import * as React from 'react';
|
3 | export default function Icon(_ref) {
|
4 | var icon = _ref.icon,
|
5 | props = _ref.props,
|
6 | children = _ref.children;
|
7 | var iconNode;
|
8 |
|
9 | if (typeof icon === 'function') {
|
10 | iconNode = /*#__PURE__*/React.createElement(icon, _objectSpread({}, props));
|
11 | } else {
|
12 | // Compatible for origin definition
|
13 | iconNode = icon;
|
14 | }
|
15 |
|
16 | return iconNode || children || null;
|
17 | } |
\ | No newline at end of file |