@micromag/screen-quiz 0.3.322 → 0.3.324
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/es/index.js +4 -2
- package/lib/index.js +4 -2
- package/package.json +13 -13
package/es/index.js
CHANGED
|
@@ -387,7 +387,9 @@ var Question = function Question(_ref) {
|
|
|
387
387
|
var _ref3 = answer || {},
|
|
388
388
|
_ref3$customAnswerLab = _ref3.customAnswerLabel,
|
|
389
389
|
customAnswerLabel = _ref3$customAnswerLab === void 0 ? null : _ref3$customAnswerLab;
|
|
390
|
-
var hasResult = customAnswerLabel
|
|
390
|
+
var hasResult = isTextFilled(customAnswerLabel) || isTextFilled(result);
|
|
391
|
+
var defaultResult = isTextFilled(result) ? result : null;
|
|
392
|
+
var customResult = isTextFilled(customAnswerLabel) ? customAnswerLabel : null;
|
|
391
393
|
var onAnswersCollapse = useCallback(function () {
|
|
392
394
|
setResultVisible(true);
|
|
393
395
|
}, [setResultVisible]);
|
|
@@ -467,7 +469,7 @@ var Question = function Question(_ref) {
|
|
|
467
469
|
playing: transitionPlaying,
|
|
468
470
|
delay: (1 + answers.length) * transitionStagger,
|
|
469
471
|
disabled: transitionDisabled
|
|
470
|
-
}, /*#__PURE__*/React.createElement(Text, Object.assign({},
|
|
472
|
+
}, /*#__PURE__*/React.createElement(Text, Object.assign({}, customResult || defaultResult, {
|
|
471
473
|
className: styles$3.resultText
|
|
472
474
|
}))) : null))) : null]);
|
|
473
475
|
};
|
package/lib/index.js
CHANGED
|
@@ -409,7 +409,9 @@ var Question = function Question(_ref) {
|
|
|
409
409
|
var _ref3 = answer || {},
|
|
410
410
|
_ref3$customAnswerLab = _ref3.customAnswerLabel,
|
|
411
411
|
customAnswerLabel = _ref3$customAnswerLab === void 0 ? null : _ref3$customAnswerLab;
|
|
412
|
-
var hasResult = customAnswerLabel
|
|
412
|
+
var hasResult = utils.isTextFilled(customAnswerLabel) || utils.isTextFilled(result);
|
|
413
|
+
var defaultResult = utils.isTextFilled(result) ? result : null;
|
|
414
|
+
var customResult = utils.isTextFilled(customAnswerLabel) ? customAnswerLabel : null;
|
|
413
415
|
var onAnswersCollapse = React.useCallback(function () {
|
|
414
416
|
setResultVisible(true);
|
|
415
417
|
}, [setResultVisible]);
|
|
@@ -489,7 +491,7 @@ var Question = function Question(_ref) {
|
|
|
489
491
|
playing: transitionPlaying,
|
|
490
492
|
delay: (1 + answers.length) * transitionStagger,
|
|
491
493
|
disabled: transitionDisabled
|
|
492
|
-
}, /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({},
|
|
494
|
+
}, /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({}, customResult || defaultResult, {
|
|
493
495
|
className: styles$3.resultText
|
|
494
496
|
}))) : null))) : null]);
|
|
495
497
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-quiz",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.324",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
53
53
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
54
54
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
55
|
-
"@micromag/core": "^0.3.
|
|
56
|
-
"@micromag/data": "^0.3.
|
|
57
|
-
"@micromag/element-background": "^0.3.
|
|
58
|
-
"@micromag/element-button": "^0.3.
|
|
59
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
60
|
-
"@micromag/element-container": "^0.3.
|
|
61
|
-
"@micromag/element-heading": "^0.3.
|
|
62
|
-
"@micromag/element-layout": "^0.3.
|
|
63
|
-
"@micromag/element-scroll": "^0.3.
|
|
64
|
-
"@micromag/element-text": "^0.3.
|
|
65
|
-
"@micromag/transforms": "^0.3.
|
|
55
|
+
"@micromag/core": "^0.3.323",
|
|
56
|
+
"@micromag/data": "^0.3.323",
|
|
57
|
+
"@micromag/element-background": "^0.3.323",
|
|
58
|
+
"@micromag/element-button": "^0.3.323",
|
|
59
|
+
"@micromag/element-call-to-action": "^0.3.323",
|
|
60
|
+
"@micromag/element-container": "^0.3.323",
|
|
61
|
+
"@micromag/element-heading": "^0.3.323",
|
|
62
|
+
"@micromag/element-layout": "^0.3.323",
|
|
63
|
+
"@micromag/element-scroll": "^0.3.323",
|
|
64
|
+
"@micromag/element-text": "^0.3.323",
|
|
65
|
+
"@micromag/transforms": "^0.3.323",
|
|
66
66
|
"@react-spring/core": "^9.6.1",
|
|
67
67
|
"@react-spring/web": "^9.6.1",
|
|
68
68
|
"classnames": "^2.2.6",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "b15f8d8d58ae9516151b72df1609290fecec1a9b"
|
|
79
79
|
}
|