@micromag/screen-quiz 0.3.193 → 0.3.196

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 CHANGED
@@ -695,14 +695,14 @@ var QuizScreen = function QuizScreen(_ref) {
695
695
  className: styles$2.question,
696
696
  style: !isPlaceholder ? {
697
697
  padding: spacing,
698
- paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
699
- paddingBottom: (!isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
698
+ paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
699
+ paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
700
700
  } : null
701
701
  })), !isPlaceholder && hasCallToAction ? /*#__PURE__*/React.createElement("div", {
702
702
  ref: callToActionRef,
703
703
  className: classNames([styles$2.callToAction, _defineProperty({}, styles$2.disabled, !scrolledBottom)]),
704
704
  style: {
705
- transform: !isPreview ? "translate(0, -".concat(viewerBottomHeight, "px)") : null,
705
+ transform: current && !isPreview ? "translate(0, -".concat(viewerBottomHeight, "px)") : null,
706
706
  paddingLeft: Math.max(spacing / 2, viewerBottomSidesWidth),
707
707
  paddingRight: Math.max(spacing / 2, viewerBottomSidesWidth),
708
708
  paddingTop: spacing / 2,
@@ -1349,8 +1349,8 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
1349
1349
  className: styles$2.intro,
1350
1350
  style: !isPlaceholder ? {
1351
1351
  padding: spacing,
1352
- paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
1353
- paddingBottom: (!isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1352
+ paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
1353
+ paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1354
1354
  } : null,
1355
1355
  onClickButton: onClickIntroButton
1356
1356
  })) : null, isQuestion ? /*#__PURE__*/React.createElement(CSSTransition, {
@@ -1381,8 +1381,8 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
1381
1381
  className: styles$2.question,
1382
1382
  style: !isPlaceholder ? {
1383
1383
  padding: spacing,
1384
- paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
1385
- paddingBottom: (!isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1384
+ paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
1385
+ paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1386
1386
  } : null
1387
1387
  })) : null, isResults ? /*#__PURE__*/React.createElement(CSSTransition, {
1388
1388
  key: "results",
@@ -1399,8 +1399,8 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
1399
1399
  className: styles$2.results,
1400
1400
  style: !isPlaceholder ? {
1401
1401
  padding: spacing,
1402
- paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
1403
- paddingBottom: (!isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1402
+ paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
1403
+ paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1404
1404
  } : null
1405
1405
  }))) : null])), !isPlaceholder && hasCallToAction ? /*#__PURE__*/React.createElement("div", {
1406
1406
  ref: callToActionRef,
package/lib/index.js CHANGED
@@ -717,14 +717,14 @@ var QuizScreen = function QuizScreen(_ref) {
717
717
  className: styles$2.question,
718
718
  style: !isPlaceholder ? {
719
719
  padding: spacing,
720
- paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
721
- paddingBottom: (!isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
720
+ paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
721
+ paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
722
722
  } : null
723
723
  })), !isPlaceholder && hasCallToAction ? /*#__PURE__*/React__default["default"].createElement("div", {
724
724
  ref: callToActionRef,
725
725
  className: classNames__default["default"]([styles$2.callToAction, _defineProperty__default["default"]({}, styles$2.disabled, !scrolledBottom)]),
726
726
  style: {
727
- transform: !isPreview ? "translate(0, -".concat(viewerBottomHeight, "px)") : null,
727
+ transform: current && !isPreview ? "translate(0, -".concat(viewerBottomHeight, "px)") : null,
728
728
  paddingLeft: Math.max(spacing / 2, viewerBottomSidesWidth),
729
729
  paddingRight: Math.max(spacing / 2, viewerBottomSidesWidth),
730
730
  paddingTop: spacing / 2,
@@ -1371,8 +1371,8 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
1371
1371
  className: styles$2.intro,
1372
1372
  style: !isPlaceholder ? {
1373
1373
  padding: spacing,
1374
- paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
1375
- paddingBottom: (!isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1374
+ paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
1375
+ paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1376
1376
  } : null,
1377
1377
  onClickButton: onClickIntroButton
1378
1378
  })) : null, isQuestion ? /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.CSSTransition, {
@@ -1403,8 +1403,8 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
1403
1403
  className: styles$2.question,
1404
1404
  style: !isPlaceholder ? {
1405
1405
  padding: spacing,
1406
- paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
1407
- paddingBottom: (!isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1406
+ paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
1407
+ paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1408
1408
  } : null
1409
1409
  })) : null, isResults ? /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.CSSTransition, {
1410
1410
  key: "results",
@@ -1421,8 +1421,8 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
1421
1421
  className: styles$2.results,
1422
1422
  style: !isPlaceholder ? {
1423
1423
  padding: spacing,
1424
- paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing,
1425
- paddingBottom: (!isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1424
+ paddingTop: (current && !isPreview ? viewerTopHeight : 0) + spacing,
1425
+ paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
1426
1426
  } : null
1427
1427
  }))) : null])), !isPlaceholder && hasCallToAction ? /*#__PURE__*/React__default["default"].createElement("div", {
1428
1428
  ref: callToActionRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-quiz",
3
- "version": "0.3.193",
3
+ "version": "0.3.196",
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.190",
56
- "@micromag/data": "^0.3.190",
57
- "@micromag/element-background": "^0.3.193",
58
- "@micromag/element-button": "^0.3.190",
59
- "@micromag/element-call-to-action": "^0.3.190",
60
- "@micromag/element-container": "^0.3.190",
61
- "@micromag/element-heading": "^0.3.190",
62
- "@micromag/element-layout": "^0.3.190",
63
- "@micromag/element-scroll": "^0.3.190",
64
- "@micromag/element-text": "^0.3.190",
65
- "@micromag/transforms": "^0.3.190",
55
+ "@micromag/core": "^0.3.196",
56
+ "@micromag/data": "^0.3.196",
57
+ "@micromag/element-background": "^0.3.196",
58
+ "@micromag/element-button": "^0.3.196",
59
+ "@micromag/element-call-to-action": "^0.3.196",
60
+ "@micromag/element-container": "^0.3.196",
61
+ "@micromag/element-heading": "^0.3.196",
62
+ "@micromag/element-layout": "^0.3.196",
63
+ "@micromag/element-scroll": "^0.3.196",
64
+ "@micromag/element-text": "^0.3.196",
65
+ "@micromag/transforms": "^0.3.196",
66
66
  "classnames": "^2.2.6",
67
67
  "lodash": "^4.17.21",
68
68
  "prop-types": "^15.7.2",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "baa77c4946627fec9822955390e547ad8639f07f"
76
+ "gitHead": "f76253e63fa17840ffa08757a7f4a32554868288"
77
77
  }