x-star-design 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/StatusTag/index.js
CHANGED
|
@@ -13,14 +13,14 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
15
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
|
-
import correctSVG from '@/assets/status-tag/correct.svg';
|
|
17
|
-
import diamondSVG from '@/assets/status-tag/diamond.svg';
|
|
18
|
-
import filledSVG from '@/assets/status-tag/filled.svg';
|
|
19
|
-
import halfCorrectSVG from '@/assets/status-tag/half-correct.svg';
|
|
20
|
-
import pendingSVG from '@/assets/status-tag/pending.svg';
|
|
21
|
-
import wrongSVG from '@/assets/status-tag/wrong.svg';
|
|
22
16
|
import classNames from 'classnames';
|
|
23
17
|
import React, { useRef, useState } from 'react';
|
|
18
|
+
import correctSVG from "../assets/status-tag/correct.svg";
|
|
19
|
+
import diamondSVG from "../assets/status-tag/diamond.svg";
|
|
20
|
+
import filledSVG from "../assets/status-tag/filled.svg";
|
|
21
|
+
import halfCorrectSVG from "../assets/status-tag/half-correct.svg";
|
|
22
|
+
import pendingSVG from "../assets/status-tag/pending.svg";
|
|
23
|
+
import wrongSVG from "../assets/status-tag/wrong.svg";
|
|
24
24
|
import { prefix } from "../utils/global";
|
|
25
25
|
var StatusTag = function StatusTag(_ref) {
|
|
26
26
|
var _statusCSSMap$get, _statusCSSMap$get2, _statusCSSMap$get3, _classNames;
|
|
@@ -101,7 +101,7 @@ var StatusTag = function StatusTag(_ref) {
|
|
|
101
101
|
}, props.style),
|
|
102
102
|
onMouseEnter: handleMouseEnter,
|
|
103
103
|
onMouseLeave: handleMouseLeave
|
|
104
|
-
},
|
|
104
|
+
}, statusCSSMap !== null && statusCSSMap !== void 0 && (_statusCSSMap$get = statusCSSMap.get(status)) !== null && _statusCSSMap$get !== void 0 && _statusCSSMap$get.icon ? hover ? showContent ? children : statusCSSMap === null || statusCSSMap === void 0 ? void 0 : (_statusCSSMap$get2 = statusCSSMap.get(status)) === null || _statusCSSMap$get2 === void 0 ? void 0 : _statusCSSMap$get2.icon : statusCSSMap === null || statusCSSMap === void 0 ? void 0 : (_statusCSSMap$get3 = statusCSSMap.get(status)) === null || _statusCSSMap$get3 === void 0 ? void 0 : _statusCSSMap$get3.icon : children, required && /*#__PURE__*/React.createElement("img", {
|
|
105
105
|
src: diamondSVG,
|
|
106
106
|
className: classNames("".concat(prefix, "required"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "circleRequired"), shape === 'circle'), _defineProperty(_classNames, "".concat(prefix, "rectRequired"), shape !== 'circle'), _classNames))
|
|
107
107
|
}));
|