@micromag/screen-quiz 0.3.822 → 0.3.823

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.
Files changed (2) hide show
  1. package/es/index.js +16 -2
  2. package/package.json +5 -4
package/es/index.js CHANGED
@@ -347,6 +347,20 @@ var Answers = function Answers(_ref) {
347
347
  var isInactive = isOtherAnswer && answeredIndex !== null;
348
348
  var inactiveButtonStyle = isInactive ? inactiveButtonsStyle : null;
349
349
  var inactiveButtonTextStyle = isInactive ? inactiveButtonsTextStyle : null;
350
+ var finalButtonStyle = _objectSpread(_objectSpread(_objectSpread({}, buttonsStyle), inactiveButtonStyle), answerButtonStyle);
351
+ var finalTextStyle = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, Object.keys(buttonsTextStyle || {}).reduce(function (acc, key) {
352
+ var value = buttonsTextStyle[key];
353
+ if (value !== null) {
354
+ acc[key] = value;
355
+ }
356
+ return acc;
357
+ }, {})), Object.keys(textStyle || {}).reduce(function (acc, key) {
358
+ var value = textStyle[key];
359
+ if (value !== null) {
360
+ acc[key] = value;
361
+ }
362
+ return acc;
363
+ }, {})), inactiveButtonTextStyle), answerButtonTextStyle);
350
364
  return /*#__PURE__*/React.createElement(animated.div, {
351
365
  key: "answer-".concat(answerI),
352
366
  className: classNames([styles$4.item, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles$4.rightAnswer, !withoutGoodAnswer && rightAnswer === true), styles$4.userAnswer, isUserAnswer), styles$4.otherAnswer, isOtherAnswer), styles$4.withoutOpacity, !hasOpacity)])
@@ -381,8 +395,8 @@ var Answers = function Answers(_ref) {
381
395
  },
382
396
  disabled: !visible || isPreview || answered,
383
397
  focusable: focusable,
384
- buttonStyle: _objectSpread(_objectSpread(_objectSpread({}, buttonsStyle), inactiveButtonStyle), answerButtonStyle),
385
- textStyle: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, buttonsTextStyle), textStyle), inactiveButtonTextStyle), answerButtonTextStyle),
398
+ buttonStyle: finalButtonStyle,
399
+ textStyle: finalTextStyle,
386
400
  label: label,
387
401
  visual: visual,
388
402
  visualClassName: styles$4.optionVisual,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-quiz",
3
- "version": "0.3.822",
3
+ "version": "0.3.823",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -66,11 +66,12 @@
66
66
  "@micromag/core": "^0.3.820",
67
67
  "@micromag/data": "^0.3.820",
68
68
  "@micromag/element-background": "^0.3.820",
69
- "@micromag/element-button": "^0.3.820",
69
+ "@micromag/element-button": "^0.3.823",
70
70
  "@micromag/element-container": "^0.3.820",
71
- "@micromag/element-footer": "^0.3.820",
71
+ "@micromag/element-footer": "^0.3.823",
72
72
  "@micromag/element-header": "^0.3.820",
73
73
  "@micromag/element-heading": "^0.3.820",
74
+ "@micromag/element-keypad": "^0.3.820",
74
75
  "@micromag/element-layout": "^0.3.820",
75
76
  "@micromag/element-scroll": "^0.3.820",
76
77
  "@micromag/element-text": "^0.3.820",
@@ -89,5 +90,5 @@
89
90
  "access": "public",
90
91
  "registry": "https://registry.npmjs.org/"
91
92
  },
92
- "gitHead": "26dc64de31584860c90ba13ca45d546452873c4a"
93
+ "gitHead": "efd3562981f1148d707bf567cce77142350f59f5"
93
94
  }