@meduza/ui-kit-2 0.1.76 → 0.1.88
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/DonatesTeaser/DonatesTeaser.types.d.ts +1 -0
- package/dist/MaterialNote/MaterialNote.types.d.ts +1 -0
- package/dist/ui-kit-2.cjs.development.js +33 -7
- package/dist/ui-kit-2.cjs.development.js.map +1 -1
- package/dist/ui-kit-2.cjs.production.min.js +1 -1
- package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
- package/dist/ui-kit-2.esm.js +33 -7
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +761 -762
- package/package.json +1 -1
- package/src/DonatesTeaser/DonatesTeaser.module.css +0 -1
- package/src/DonatesTeaser/DonatesTeaser.stories.tsx +2 -1
- package/src/DonatesTeaser/DonatesTeaser.types.ts +1 -0
- package/src/DonatesTeaser/index.tsx +25 -8
- package/src/MaterialNote/MaterialNote.types.ts +1 -0
- package/src/MaterialNote/index.tsx +2 -1
- package/src/RenderBlocks/index.tsx +7 -1
|
@@ -910,13 +910,29 @@ var Table = function Table(_ref) {
|
|
|
910
910
|
var styles$b = {"root":"DonatesTeaser-module_root__3rtaJ","ctaInner":"DonatesTeaser-module_ctaInner__2LChL","main":"DonatesTeaser-module_main__YBt6p","title":"DonatesTeaser-module_title__hs-yr","text":"DonatesTeaser-module_text__ro-QA","cta":"DonatesTeaser-module_cta__1orPb","center":"DonatesTeaser-module_center__2Ynx9","isInCard":"DonatesTeaser-module_isInCard__HrFh8","isInSlide":"DonatesTeaser-module_isInSlide__1vC4Z"};
|
|
911
911
|
|
|
912
912
|
var DonatesTeaser = function DonatesTeaser(_ref) {
|
|
913
|
-
var styleContext = _ref.styleContext
|
|
913
|
+
var styleContext = _ref.styleContext,
|
|
914
|
+
_ref$lang = _ref.lang,
|
|
915
|
+
lang = _ref$lang === void 0 ? 'ru' : _ref$lang;
|
|
914
916
|
var classNames = [[styles$b.root, true]];
|
|
915
917
|
|
|
916
918
|
if (styleContext) {
|
|
917
919
|
classNames = makeStyleContext(classNames, styleContext, styles$b);
|
|
918
920
|
}
|
|
919
921
|
|
|
922
|
+
var data = {
|
|
923
|
+
ru: {
|
|
924
|
+
title: 'Вы читали «Медузу». Вы слушали «Медузу». Вы смотрели «Медузу»',
|
|
925
|
+
subtitle: 'Помогите нам спасти «Медузу»',
|
|
926
|
+
button: 'Дать денег',
|
|
927
|
+
href: 'https://support.meduza.io'
|
|
928
|
+
},
|
|
929
|
+
en: {
|
|
930
|
+
title: 'You read Meduza. You listen to Meduza. You follow Meduza',
|
|
931
|
+
subtitle: 'Help save Meduza',
|
|
932
|
+
button: 'Pledge today',
|
|
933
|
+
href: 'https://support.meduza.io/en'
|
|
934
|
+
}
|
|
935
|
+
};
|
|
920
936
|
return React__default.createElement("div", {
|
|
921
937
|
"data-testid": "donates-teaser",
|
|
922
938
|
className: makeClassName(classNames)
|
|
@@ -924,23 +940,31 @@ var DonatesTeaser = function DonatesTeaser(_ref) {
|
|
|
924
940
|
className: styles$b.main
|
|
925
941
|
}, React__default.createElement("h3", {
|
|
926
942
|
className: styles$b.title
|
|
927
|
-
},
|
|
928
|
-
|
|
929
|
-
|
|
943
|
+
}, React__default.createElement("span", {
|
|
944
|
+
dangerouslySetInnerHTML: {
|
|
945
|
+
__html: data[lang].title
|
|
946
|
+
}
|
|
947
|
+
}), " ", React__default.createElement("span", {
|
|
948
|
+
className: styles$b.text,
|
|
949
|
+
dangerouslySetInnerHTML: {
|
|
950
|
+
__html: data[lang].subtitle
|
|
951
|
+
}
|
|
952
|
+
}))), React__default.createElement("div", {
|
|
930
953
|
className: styles$b.cta
|
|
931
954
|
}, React__default.createElement("a", {
|
|
932
|
-
href:
|
|
955
|
+
href: data[lang].href,
|
|
933
956
|
target: "_blank",
|
|
934
957
|
rel: "noreferrer"
|
|
935
958
|
}, React__default.createElement("span", {
|
|
936
959
|
className: styles$b.ctaInner
|
|
937
|
-
},
|
|
960
|
+
}, data[lang].button))));
|
|
938
961
|
};
|
|
939
962
|
|
|
940
963
|
var styles$c = {"root":"MaterialNote-module_root__1AcYe","dark":"MaterialNote-module_dark__xCry-","note_credit":"MaterialNote-module_note_credit__PuFyX","note_caption":"MaterialNote-module_note_caption__1ezSo","center":"MaterialNote-module_center__18RxI","default":"MaterialNote-module_default__1lQPl","card":"MaterialNote-module_card__OWXbQ","slide":"MaterialNote-module_slide__1ZBBq","game":"MaterialNote-module_game__cADMe","gameSurvey":"MaterialNote-module_gameSurvey__3SiG-"};
|
|
941
964
|
|
|
942
965
|
var MaterialNote = function MaterialNote(_ref) {
|
|
943
966
|
var data = _ref.block.data,
|
|
967
|
+
lang = _ref.lang,
|
|
944
968
|
styleContext = _ref.styleContext;
|
|
945
969
|
var classNames = [[styles$c.root, true]];
|
|
946
970
|
|
|
@@ -949,7 +973,8 @@ var MaterialNote = function MaterialNote(_ref) {
|
|
|
949
973
|
}
|
|
950
974
|
|
|
951
975
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(DonatesTeaser, {
|
|
952
|
-
styleContext: styleContext
|
|
976
|
+
styleContext: styleContext,
|
|
977
|
+
lang: lang
|
|
953
978
|
}), React__default.createElement("div", {
|
|
954
979
|
"data-testid": "material-note",
|
|
955
980
|
className: makeClassName(classNames)
|
|
@@ -2172,6 +2197,7 @@ var RenderBlocks = function RenderBlocks(_ref) {
|
|
|
2172
2197
|
case 'material_note':
|
|
2173
2198
|
return React__default.createElement(MaterialNote, {
|
|
2174
2199
|
block: block,
|
|
2200
|
+
lang: block.lang,
|
|
2175
2201
|
styleContext: styleContext
|
|
2176
2202
|
});
|
|
2177
2203
|
|