@coorpacademy/components 10.7.1 → 10.10.0
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/atom/button-link/index.js +10 -3
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/select/test/fixtures.js +4 -0
- package/es/atom/select/test/fixtures.js.map +1 -1
- package/es/molecule/checkbox-with-title/index.js +51 -0
- package/es/molecule/checkbox-with-title/index.js.map +1 -0
- package/es/molecule/checkbox-with-title/style.css +62 -0
- package/es/molecule/checkbox-with-title/test/fixtures/checked.js +8 -0
- package/es/molecule/checkbox-with-title/test/fixtures/checked.js.map +1 -0
- package/es/molecule/checkbox-with-title/test/fixtures/unchecked.js +8 -0
- package/es/molecule/checkbox-with-title/test/fixtures/unchecked.js.map +1 -0
- package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
- package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/es/molecule/course-sections/test/fixtures.js +15 -0
- package/es/molecule/course-sections/test/fixtures.js.map +1 -0
- package/es/molecule/dashboard/review-banner/index.js +79 -0
- package/es/molecule/dashboard/review-banner/index.js.map +1 -0
- package/es/molecule/dashboard/review-banner/style.css +186 -0
- package/es/molecule/dashboard/review-banner/test/fixtures/default.js +11 -0
- package/es/molecule/dashboard/review-banner/test/fixtures/default.js.map +1 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js +13 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/es/molecule/draggable-list/test/fixtures.js +2 -0
- package/es/molecule/draggable-list/test/fixtures.js.map +1 -1
- package/es/molecule/questions/free-text/test/fixtures.js +4 -2
- package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/es/molecule/review-correction-popin/index.js +105 -0
- package/es/molecule/review-correction-popin/index.js.map +1 -0
- package/es/molecule/review-correction-popin/style.css +318 -0
- package/es/molecule/review-correction-popin/test/fixtures/right.js +17 -0
- package/es/molecule/review-correction-popin/test/fixtures/right.js.map +1 -0
- package/es/molecule/review-correction-popin/test/fixtures/wrong.js +19 -0
- package/es/molecule/review-correction-popin/test/fixtures/wrong.js.map +1 -0
- package/es/molecule/review-correction-popin/test/fixtures.js +15 -0
- package/es/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/es/molecule/wizard-summary/test/fixtures.js +2 -0
- package/es/molecule/wizard-summary/test/fixtures.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures.js +2 -0
- package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures.js +2 -0
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/util/button-icons.js +2 -1
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/button-link/index.js +11 -3
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/select/test/fixtures.js +6 -0
- package/lib/atom/select/test/fixtures.js.map +1 -1
- package/lib/molecule/checkbox-with-title/index.js +66 -0
- package/lib/molecule/checkbox-with-title/index.js.map +1 -0
- package/lib/molecule/checkbox-with-title/style.css +62 -0
- package/lib/molecule/checkbox-with-title/test/fixtures/checked.js +13 -0
- package/lib/molecule/checkbox-with-title/test/fixtures/checked.js.map +1 -0
- package/lib/molecule/checkbox-with-title/test/fixtures/unchecked.js +13 -0
- package/lib/molecule/checkbox-with-title/test/fixtures/unchecked.js.map +1 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/course-sections/test/fixtures.js +25 -0
- package/lib/molecule/course-sections/test/fixtures.js.map +1 -0
- package/lib/molecule/dashboard/review-banner/index.js +94 -0
- package/lib/molecule/dashboard/review-banner/index.js.map +1 -0
- package/lib/molecule/dashboard/review-banner/style.css +186 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures/default.js +16 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures/default.js.map +1 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js +22 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/lib/molecule/draggable-list/test/fixtures.js +3 -0
- package/lib/molecule/draggable-list/test/fixtures.js.map +1 -1
- package/lib/molecule/questions/free-text/test/fixtures.js +5 -2
- package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/lib/molecule/review-correction-popin/index.js +118 -0
- package/lib/molecule/review-correction-popin/index.js.map +1 -0
- package/lib/molecule/review-correction-popin/style.css +318 -0
- package/lib/molecule/review-correction-popin/test/fixtures/right.js +22 -0
- package/lib/molecule/review-correction-popin/test/fixtures/right.js.map +1 -0
- package/lib/molecule/review-correction-popin/test/fixtures/wrong.js +24 -0
- package/lib/molecule/review-correction-popin/test/fixtures/wrong.js.map +1 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js +25 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/wizard-summary/test/fixtures.js +3 -0
- package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures.js +3 -0
- package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +3 -0
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/util/button-icons.js +1 -0
- package/lib/util/button-icons.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _getOr = _interopRequireDefault(require("lodash/fp/getOr"));
|
|
11
|
+
|
|
12
|
+
var _provider = _interopRequireDefault(require("../../../atom/provider"));
|
|
13
|
+
|
|
14
|
+
var _buttonLink = _interopRequireDefault(require("../../../atom/button-link"));
|
|
15
|
+
|
|
16
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
+
|
|
22
|
+
const ReviewBanner = (props, context) => {
|
|
23
|
+
const {
|
|
24
|
+
title,
|
|
25
|
+
subtitle,
|
|
26
|
+
cta
|
|
27
|
+
} = props;
|
|
28
|
+
const {
|
|
29
|
+
skin
|
|
30
|
+
} = context;
|
|
31
|
+
const primary = (0, _getOr.default)('#00B0FF', 'common.primary', skin);
|
|
32
|
+
|
|
33
|
+
const buttonProps = _extends(_extends({}, cta), {}, {
|
|
34
|
+
type: 'primary'
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const ctaStyle = {
|
|
38
|
+
background: primary
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
className: _style.default.root,
|
|
42
|
+
"data-name": "start-review-banner"
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
+
className: _style.default.container
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
+
className: _style.default.banner
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
+
className: _style.default.left,
|
|
49
|
+
role: "img",
|
|
50
|
+
"aria-label": "Left image container"
|
|
51
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
52
|
+
className: _style.default.image,
|
|
53
|
+
src: "https://static.coorpacademy.com/site/book.png",
|
|
54
|
+
alt: "Book image"
|
|
55
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
+
className: _style.default.middle
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
58
|
+
className: _style.default.title,
|
|
59
|
+
"data-name": "review-banner-title",
|
|
60
|
+
"aria-label": "{title}"
|
|
61
|
+
}, title), /*#__PURE__*/_react.default.createElement("span", {
|
|
62
|
+
className: _style.default.subtitle,
|
|
63
|
+
"data-name": "review-banner-subtitle",
|
|
64
|
+
"aria-label": "{subtitle}"
|
|
65
|
+
}, subtitle), /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, buttonProps, {
|
|
66
|
+
className: _style.default.cta,
|
|
67
|
+
customStyle: ctaStyle
|
|
68
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
+
className: _style.default.right,
|
|
70
|
+
role: "img",
|
|
71
|
+
"aria-label": "Rigth image container"
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
73
|
+
className: _style.default.image,
|
|
74
|
+
src: "https://static.coorpacademy.com/site/dumbell.png",
|
|
75
|
+
alt: "Dumbbell image"
|
|
76
|
+
})))));
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
ReviewBanner.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
80
|
+
title: _propTypes.default.string,
|
|
81
|
+
subtitle: _propTypes.default.string,
|
|
82
|
+
cta: _propTypes.default.shape({
|
|
83
|
+
onClick: _propTypes.default.func,
|
|
84
|
+
label: _propTypes.default.string
|
|
85
|
+
})
|
|
86
|
+
} : {};
|
|
87
|
+
ReviewBanner.contextTypes = {
|
|
88
|
+
skin: _provider.default.childContextTypes.skin
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var _default = _react.default.memo(ReviewBanner);
|
|
92
|
+
|
|
93
|
+
exports.default = _default;
|
|
94
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/dashboard/review-banner/index.js"],"names":["ReviewBanner","props","context","title","subtitle","cta","skin","primary","buttonProps","type","ctaStyle","background","style","root","container","banner","left","image","middle","right","propTypes","PropTypes","string","shape","onClick","func","label","contextTypes","Provider","childContextTypes","React","memo"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,YAAY,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AACvC,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA,QAAR;AAAkBC,IAAAA;AAAlB,MAAyBJ,KAA/B;AACA,QAAM;AAACK,IAAAA;AAAD,MAASJ,OAAf;AACA,QAAMK,OAAO,GAAG,oBAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAAhB;;AAEA,QAAME,WAAW,yBACZH,GADY;AAEfI,IAAAA,IAAI,EAAE;AAFS,IAAjB;;AAIA,QAAMC,QAAQ,GAAG;AACfC,IAAAA,UAAU,EAAEJ;AADG,GAAjB;AAIA,sBACE;AAAK,IAAA,SAAS,EAAEK,eAAMC,IAAtB;AAA4B,iBAAU;AAAtC,kBACE;AAAK,IAAA,SAAS,EAAED,eAAME;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEF,eAAMG;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEH,eAAMI,IAAtB;AAA4B,IAAA,IAAI,EAAC,KAAjC;AAAuC,kBAAW;AAAlD,kBACE;AACE,IAAA,SAAS,EAAEJ,eAAMK,KADnB;AAEE,IAAA,GAAG,EAAC,+CAFN;AAGE,IAAA,GAAG,EAAC;AAHN,IADF,CADF,eAQE;AAAK,IAAA,SAAS,EAAEL,eAAMM;AAAtB,kBACE;AAAM,IAAA,SAAS,EAAEN,eAAMT,KAAvB;AAA8B,iBAAU,qBAAxC;AAA8D,kBAAW;AAAzE,KACGA,KADH,CADF,eAIE;AACE,IAAA,SAAS,EAAES,eAAMR,QADnB;AAEE,iBAAU,wBAFZ;AAGE,kBAAW;AAHb,KAKGA,QALH,CAJF,eAWE,6BAAC,mBAAD,eAAgBI,WAAhB;AAA6B,IAAA,SAAS,EAAEI,eAAMP,GAA9C;AAAmD,IAAA,WAAW,EAAEK;AAAhE,KAXF,CARF,eAqBE;AAAK,IAAA,SAAS,EAAEE,eAAMO,KAAtB;AAA6B,IAAA,IAAI,EAAC,KAAlC;AAAwC,kBAAW;AAAnD,kBACE;AACE,IAAA,SAAS,EAAEP,eAAMK,KADnB;AAEE,IAAA,GAAG,EAAC,kDAFN;AAGE,IAAA,GAAG,EAAC;AAHN,IADF,CArBF,CADF,CADF,CADF;AAmCD,CAhDD;;AAkDAjB,YAAY,CAACoB,SAAb,2CAAyB;AACvBjB,EAAAA,KAAK,EAAEkB,mBAAUC,MADM;AAEvBlB,EAAAA,QAAQ,EAAEiB,mBAAUC,MAFG;AAGvBjB,EAAAA,GAAG,EAAEgB,mBAAUE,KAAV,CAAgB;AACnBC,IAAAA,OAAO,EAAEH,mBAAUI,IADA;AAEnBC,IAAAA,KAAK,EAAEL,mBAAUC;AAFE,GAAhB;AAHkB,CAAzB;AASAtB,YAAY,CAAC2B,YAAb,GAA4B;AAC1BrB,EAAAA,IAAI,EAAEsB,kBAASC,iBAAT,CAA2BvB;AADP,CAA5B;;eAIewB,eAAMC,IAAN,CAAW/B,YAAX,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport Provider from '../../../atom/provider';\nimport ButtonLink from '../../../atom/button-link';\nimport style from './style.css';\n\nconst ReviewBanner = (props, context) => {\n const {title, subtitle, cta} = props;\n const {skin} = context;\n const primary = getOr('#00B0FF', 'common.primary', skin);\n\n const buttonProps = {\n ...cta,\n type: 'primary'\n };\n const ctaStyle = {\n background: primary\n };\n\n return (\n <div className={style.root} data-name=\"start-review-banner\">\n <div className={style.container}>\n <div className={style.banner}>\n <div className={style.left} role=\"img\" aria-label=\"Left image container\">\n <img\n className={style.image}\n src=\"https://static.coorpacademy.com/site/book.png\"\n alt=\"Book image\"\n />\n </div>\n <div className={style.middle}>\n <span className={style.title} data-name=\"review-banner-title\" aria-label=\"{title}\">\n {title}\n </span>\n <span\n className={style.subtitle}\n data-name=\"review-banner-subtitle\"\n aria-label=\"{subtitle}\"\n >\n {subtitle}\n </span>\n <ButtonLink {...buttonProps} className={style.cta} customStyle={ctaStyle} />\n </div>\n <div className={style.right} role=\"img\" aria-label=\"Rigth image container\">\n <img\n className={style.image}\n src=\"https://static.coorpacademy.com/site/dumbell.png\"\n alt=\"Dumbbell image\"\n />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nReviewBanner.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n cta: PropTypes.shape({\n onClick: PropTypes.func,\n label: PropTypes.string\n })\n};\n\nReviewBanner.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default React.memo(ReviewBanner);\n"],"file":"index.js"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
@value breakpoints: "../../../variables/breakpoints.css";
|
|
2
|
+
@value colors: "../../../variables/colors.css";
|
|
3
|
+
@value tablet from breakpoints;
|
|
4
|
+
@value mobile from breakpoints;
|
|
5
|
+
@value white from colors;
|
|
6
|
+
@value battle_bg from colors;
|
|
7
|
+
|
|
8
|
+
.root {
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
padding: 24px 30px;
|
|
12
|
+
font-family: Gilroy;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.container {
|
|
16
|
+
width: 100%;
|
|
17
|
+
max-width: 1080px;
|
|
18
|
+
height: 214px;
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
position: relative;
|
|
22
|
+
top: 0px;
|
|
23
|
+
left: 0px;
|
|
24
|
+
background: battle_bg;
|
|
25
|
+
background-image: url(https://static.coorpacademy.com/site/startBattleBackground.png);
|
|
26
|
+
background-size: cover;
|
|
27
|
+
border-radius: 16px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.container:hover .right, .container:hover .left {
|
|
31
|
+
animation-play-state: running;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.banner {
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: row;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: space-between;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.left {
|
|
44
|
+
width: 210px;
|
|
45
|
+
height: 123px;
|
|
46
|
+
position: relative;
|
|
47
|
+
top: -57px;
|
|
48
|
+
left: 2%;
|
|
49
|
+
animation-play-state: paused;
|
|
50
|
+
animation-name: leftAnimation;
|
|
51
|
+
animation-duration: 2s;
|
|
52
|
+
animation-delay: 0;
|
|
53
|
+
animation-iteration-count: infinite;
|
|
54
|
+
animation-direction: forward;
|
|
55
|
+
animation-timing-function: ease-in-out;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.right {
|
|
59
|
+
position: relative;
|
|
60
|
+
bottom: -32px;
|
|
61
|
+
width: 210px;
|
|
62
|
+
height: 180px;
|
|
63
|
+
right: 2%;
|
|
64
|
+
animation-play-state: paused;
|
|
65
|
+
animation-name: rightAnimation;
|
|
66
|
+
animation-duration: 2s;
|
|
67
|
+
animation-delay: 0;
|
|
68
|
+
animation-iteration-count: infinite;
|
|
69
|
+
animation-direction: forward;
|
|
70
|
+
animation-timing-function: ease-in-out;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.image {
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 100%;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.middle {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
align-items: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.title {
|
|
85
|
+
padding-top: 30px;
|
|
86
|
+
font-weight: 800;
|
|
87
|
+
font-size: 48px;
|
|
88
|
+
line-height: 59px;
|
|
89
|
+
color: white;
|
|
90
|
+
display: block;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.subtitle {
|
|
94
|
+
font-style: normal;
|
|
95
|
+
font-weight: normal;
|
|
96
|
+
font-size: 20px;
|
|
97
|
+
line-height: 24px;
|
|
98
|
+
opacity: 0.9;
|
|
99
|
+
display: block;
|
|
100
|
+
color: white;
|
|
101
|
+
text-align: center;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.cta {
|
|
105
|
+
margin-top: 22px;
|
|
106
|
+
max-width: 200px;
|
|
107
|
+
border-radius: 36px;
|
|
108
|
+
font-style: normal;
|
|
109
|
+
font-weight: bold;
|
|
110
|
+
font-size: 16px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@media tablet {
|
|
114
|
+
.left {
|
|
115
|
+
width: 170px;
|
|
116
|
+
height: 100px;
|
|
117
|
+
top: -67px
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.right {
|
|
121
|
+
width: 170px;
|
|
122
|
+
height: 146px;
|
|
123
|
+
bottom: -45px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.title {
|
|
127
|
+
padding-top: 5px;
|
|
128
|
+
font-size: 32px;
|
|
129
|
+
line-height: 39px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.subtitle {
|
|
133
|
+
font-size: 16px;
|
|
134
|
+
line-height: 19px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.cta {
|
|
138
|
+
max-width: 175px;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@media mobile {
|
|
143
|
+
.container {
|
|
144
|
+
height: 161px;
|
|
145
|
+
max-width: 327px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.banner {
|
|
149
|
+
justify-content: center;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.right {
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.left {
|
|
157
|
+
display: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.title {
|
|
161
|
+
padding-top: 5px;
|
|
162
|
+
font-size: 32px;
|
|
163
|
+
line-height: 39px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.subtitle {
|
|
167
|
+
font-size: 16px;
|
|
168
|
+
line-height: 19px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.cta {
|
|
172
|
+
max-width: 150px;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@keyframes rightAnimation {
|
|
177
|
+
0% {transform: translate3d(0, 10px, 0);}
|
|
178
|
+
50% {transform: translate3d(0, 0, 0);}
|
|
179
|
+
100% {transform: translate3d(0, 10px, 0);}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@keyframes leftAnimation {
|
|
183
|
+
0% {transform: translate3d(0, 0, 0);}
|
|
184
|
+
50% {transform: translate3d(0, 10px, 0);}
|
|
185
|
+
100% {transform: translate3d(0, 0, 0);}
|
|
186
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
title: 'Revision mode',
|
|
8
|
+
subtitle: 'Lorem ipsum dolor sit amet consectur',
|
|
9
|
+
cta: {
|
|
10
|
+
label: 'Start revision',
|
|
11
|
+
onClick: () => {}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.default = _default;
|
|
16
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/molecule/dashboard/review-banner/test/fixtures/default.js"],"names":["props","title","subtitle","cta","label","onClick"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,eADF;AAELC,IAAAA,QAAQ,EAAE,sCAFL;AAGLC,IAAAA,GAAG,EAAE;AACHC,MAAAA,KAAK,EAAE,gBADJ;AAEHC,MAAAA,OAAO,EAAE,MAAM,CAAE;AAFd;AAHA;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Revision mode',\n subtitle: 'Lorem ipsum dolor sit amet consectur',\n cta: {\n label: 'Start revision',\n onClick: () => {}\n }\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
(0, _ava.default)('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {
|
|
16
|
+
t.pass();
|
|
17
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
18
|
+
t.not(value, undefined, `PropType for "MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
(0, _ava.default)('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
22
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/dashboard/review-banner/test/fixtures.js"],"names":["t","pass","MoleculeDashboardReviewBanner","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iFAAL,EAAwFA,CAAC,IAAI;AAC3FA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA8BC,SAAtC,EAAiD,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2EAA0EF,GAAI,mEAAvG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kFAAL,EAAyFG,wBAAzF,EAA+GN,SAA/G,EAA8IO,gBAA9I","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeDashboardReviewBanner from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDashboardReviewBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', renderComponentMacro, MoleculeDashboardReviewBanner, fixtureDefault);\n"],"file":"fixtures.js"}
|
|
@@ -8,6 +8,8 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
|
|
|
8
8
|
|
|
9
9
|
var _ = _interopRequireDefault(require(".."));
|
|
10
10
|
|
|
11
|
+
var _courseSections = _interopRequireDefault(require("./fixtures/course-sections"));
|
|
12
|
+
|
|
11
13
|
var _dashboardSections = _interopRequireDefault(require("./fixtures/dashboard-sections"));
|
|
12
14
|
|
|
13
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -18,5 +20,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
18
20
|
t.not(value, undefined, `PropType for "Molecule.MoleculeDraggableList.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
19
21
|
});
|
|
20
22
|
});
|
|
23
|
+
(0, _ava.default)('Molecule › MoleculeDraggableList › CourseSections › should be rendered', _renderComponent.default, _.default, _courseSections.default);
|
|
21
24
|
(0, _ava.default)('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', _renderComponent.default, _.default, _dashboardSections.default);
|
|
22
25
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/draggable-list/test/fixtures.js"],"names":["t","pass","MoleculeDraggableList","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDashboardSections"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,2EAAL,
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/draggable-list/test/fixtures.js"],"names":["t","pass","MoleculeDraggableList","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCourseSections","fixtureDashboardSections"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,wEAAL,EAA+EG,wBAA/E,EAAqGN,SAArG,EAA4HO,uBAA5H;AACA,kBAAK,2EAAL,EAAkFD,wBAAlF,EAAwGN,SAAxG,EAA+HQ,0BAA/H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDraggableList from '..';\nimport fixtureCourseSections from './fixtures/course-sections';\nimport fixtureDashboardSections from './fixtures/dashboard-sections';\n\ntest('Molecule › MoleculeDraggableList > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDraggableList.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDraggableList.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDraggableList › CourseSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureCourseSections);\ntest('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureDashboardSections);\n"],"file":"fixtures.js"}
|
|
@@ -10,7 +10,9 @@ var _ = _interopRequireDefault(require(".."));
|
|
|
10
10
|
|
|
11
11
|
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _withValueOnChange = _interopRequireDefault(require("./fixtures/with-value-on-change"));
|
|
14
|
+
|
|
15
|
+
var _withValue = _interopRequireDefault(require("./fixtures/with-value"));
|
|
14
16
|
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
18
|
|
|
@@ -21,5 +23,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
21
23
|
});
|
|
22
24
|
});
|
|
23
25
|
(0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
24
|
-
(0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText ›
|
|
26
|
+
(0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › WithValueOnChange › should be rendered', _renderComponent.default, _.default, _withValueOnChange.default);
|
|
27
|
+
(0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', _renderComponent.default, _.default, _withValue.default);
|
|
25
28
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["t","pass","MoleculeQuestionsFreeText","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["t","pass","MoleculeQuestionsFreeText","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureWithValueOnChange","fixtureWithValue"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,6EAAL,EAAoFA,CAAC,IAAI;AACvFA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA0BC,SAAlC,EAA6C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uEAAsEF,GAAI,mEAAnG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,8EAAL,EAAqFG,wBAArF,EAA2GN,SAA3G,EAAsIO,gBAAtI;AACA,kBAAK,wFAAL,EAA+FD,wBAA/F,EAAqHN,SAArH,EAAgJQ,0BAAhJ;AACA,kBAAK,gFAAL,EAAuFF,wBAAvF,EAA6GN,SAA7G,EAAwIS,kBAAxI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeQuestionsFreeText from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValueOnChange from './fixtures/with-value-on-change';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeQuestionsFreeText.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeQuestions.MoleculeQuestionsFreeText.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureDefault);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithValueOnChange › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValueOnChange);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValue);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
13
|
+
|
|
14
|
+
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
15
|
+
|
|
16
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
+
|
|
22
|
+
const buildKlfButton = klf => {
|
|
23
|
+
const klfButtonProps = _extends(_extends({}, klf), {}, {
|
|
24
|
+
icon: {
|
|
25
|
+
position: 'left',
|
|
26
|
+
type: 'key'
|
|
27
|
+
},
|
|
28
|
+
type: 'primary'
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: _style.default.klfContainer
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
+
className: _style.default.klfButtonContainer
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, klfButtonProps, {
|
|
36
|
+
className: _style.default.klfButton
|
|
37
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
+
className: _style.default.toolTip
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
className: _style.default.tooltipText
|
|
41
|
+
}, klf.tooltip)));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const ReviewCorrectionPopin = props => {
|
|
45
|
+
const {
|
|
46
|
+
information,
|
|
47
|
+
resultLabel,
|
|
48
|
+
type,
|
|
49
|
+
klf,
|
|
50
|
+
next
|
|
51
|
+
} = props;
|
|
52
|
+
|
|
53
|
+
const nextQuestionButtonProps = _extends(_extends({}, next), {}, {
|
|
54
|
+
type: 'primary'
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const cta = type === 'wrong' ? buildKlfButton(klf) : null;
|
|
58
|
+
const ICONS = {
|
|
59
|
+
right: _novaIcons.NovaCompositionCoorpacademyCheck,
|
|
60
|
+
wrong: _novaIcons.NovaSolidStatusClose
|
|
61
|
+
};
|
|
62
|
+
const Icon = ICONS[type];
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
64
|
+
className: _style.default.wrapper
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: (0, _classnames.default)(_style.default.popin, type === 'right' ? _style.default.right : _style.default.wrong)
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
className: _style.default.correctionSection
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
70
|
+
className: _style.default.iconCircle
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
72
|
+
className: type === 'right' ? _style.default.iconRight : _style.default.iconWrong
|
|
73
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
+
className: _style.default.resultLabel,
|
|
75
|
+
"aria-label": "result"
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
77
|
+
"aria-label": resultLabel
|
|
78
|
+
}, resultLabel))), /*#__PURE__*/_react.default.createElement("div", {
|
|
79
|
+
className: _style.default.feedbackSection
|
|
80
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
81
|
+
className: _style.default.information,
|
|
82
|
+
"aria-label": "answer-information"
|
|
83
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
+
className: _style.default.labelContainer
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
86
|
+
className: _style.default.label,
|
|
87
|
+
"aria-label": information.label
|
|
88
|
+
}, information.label)), /*#__PURE__*/_react.default.createElement("span", {
|
|
89
|
+
className: _style.default.message,
|
|
90
|
+
"aria-label": information.message
|
|
91
|
+
}, information.message))), /*#__PURE__*/_react.default.createElement("div", {
|
|
92
|
+
className: type === 'right' ? _style.default.actions : _style.default.actionsWrong
|
|
93
|
+
}, cta, /*#__PURE__*/_react.default.createElement("div", {
|
|
94
|
+
className: _style.default.nextQuestionContainer
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, nextQuestionButtonProps, {
|
|
96
|
+
className: _style.default.nextQuestionButton
|
|
97
|
+
}))))));
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
ReviewCorrectionPopin.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
101
|
+
type: _propTypes.default.oneOf(['right', 'wrong']),
|
|
102
|
+
resultLabel: _propTypes.default.string,
|
|
103
|
+
information: _propTypes.default.shape({
|
|
104
|
+
label: _propTypes.default.string,
|
|
105
|
+
message: _propTypes.default.string
|
|
106
|
+
}),
|
|
107
|
+
next: _propTypes.default.shape({
|
|
108
|
+
label: _propTypes.default.string,
|
|
109
|
+
onClick: _propTypes.default.func
|
|
110
|
+
}),
|
|
111
|
+
klf: _propTypes.default.shape({
|
|
112
|
+
label: _propTypes.default.string,
|
|
113
|
+
onClick: _propTypes.default.func
|
|
114
|
+
})
|
|
115
|
+
} : {};
|
|
116
|
+
var _default = ReviewCorrectionPopin;
|
|
117
|
+
exports.default = _default;
|
|
118
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/review-correction-popin/index.js"],"names":["buildKlfButton","klf","klfButtonProps","icon","position","type","style","klfContainer","klfButtonContainer","klfButton","toolTip","tooltipText","tooltip","ReviewCorrectionPopin","props","information","resultLabel","next","nextQuestionButtonProps","cta","ICONS","right","RightIcon","wrong","WrongIcon","Icon","wrapper","popin","correctionSection","iconCircle","iconRight","iconWrong","feedbackSection","labelContainer","label","message","actions","actionsWrong","nextQuestionContainer","nextQuestionButton","propTypes","PropTypes","oneOf","string","shape","onClick","func"],"mappings":"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","sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildKlfButton = klf => {\n const klfButtonProps = {\n ...klf,\n icon: {\n position: 'left',\n type: 'key'\n },\n type: 'primary'\n };\n\n return (\n <div className={style.klfContainer}>\n <div className={style.klfButtonContainer}>\n <ButtonLink {...klfButtonProps} className={style.klfButton} />\n </div>\n <div className={style.toolTip}>\n <div className={style.tooltipText}>{klf.tooltip}</div>\n </div>\n </div>\n );\n};\n\nconst ReviewCorrectionPopin = props => {\n const {information, resultLabel, type, klf, next} = props;\n\n const nextQuestionButtonProps = {\n ...next,\n type: 'primary'\n };\n\n const cta = type === 'wrong' ? buildKlfButton(klf) : null;\n\n const ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n };\n const Icon = ICONS[type];\n\n return (\n <div className={style.wrapper}>\n <div className={classnames(style.popin, type === 'right' ? style.right : style.wrong)}>\n <div className={style.correctionSection}>\n <div className={style.iconCircle}>\n <Icon className={type === 'right' ? style.iconRight : style.iconWrong} />\n </div>\n <div className={style.resultLabel} aria-label=\"result\">\n <span aria-label={resultLabel}>{resultLabel}</span>\n </div>\n </div>\n <div className={style.feedbackSection}>\n <div className={style.information} aria-label=\"answer-information\">\n <div className={style.labelContainer}>\n <span className={style.label} aria-label={information.label}>\n {information.label}\n </span>\n </div>\n <span className={style.message} aria-label={information.message}>\n {information.message}\n </span>\n </div>\n </div>\n <div className={type === 'right' ? style.actions : style.actionsWrong}>\n {cta}\n <div className={style.nextQuestionContainer}>\n <ButtonLink {...nextQuestionButtonProps} className={style.nextQuestionButton} />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nReviewCorrectionPopin.propTypes = {\n type: PropTypes.oneOf(['right', 'wrong']),\n resultLabel: PropTypes.string,\n information: PropTypes.shape({\n label: PropTypes.string,\n message: PropTypes.string\n }),\n next: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n klf: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default ReviewCorrectionPopin;\n"],"file":"index.js"}
|