@meduza/ui-kit-2 0.1.75 → 0.1.77
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 +34 -10
- 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 +34 -10
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +1364 -1369
- package/package.json +1 -1
- package/src/DonatesTeaser/DonatesTeaser.module.css +1 -7
- package/src/DonatesTeaser/DonatesTeaser.stories.tsx +2 -1
- package/src/DonatesTeaser/DonatesTeaser.types.ts +1 -0
- package/src/DonatesTeaser/index.tsx +26 -8
- package/src/MaterialNote/MaterialNote.types.ts +1 -0
- package/src/MaterialNote/index.tsx +2 -1
- package/src/RenderBlocks/index.tsx +3 -1
|
@@ -907,16 +907,32 @@ var Table = function Table(_ref) {
|
|
|
907
907
|
}));
|
|
908
908
|
};
|
|
909
909
|
|
|
910
|
-
var styles$b = {"root":"DonatesTeaser-module_root__3rtaJ","ctaInner":"DonatesTeaser-module_ctaInner__2LChL","main":"DonatesTeaser-module_main__YBt6p","
|
|
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,25 +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
|
-
|
|
930
|
-
|
|
931
|
-
}, "
|
|
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", {
|
|
932
953
|
className: styles$b.cta
|
|
933
954
|
}, React__default.createElement("a", {
|
|
934
|
-
href:
|
|
955
|
+
href: data[lang].href,
|
|
935
956
|
target: "_blank",
|
|
936
957
|
rel: "noreferrer"
|
|
937
958
|
}, React__default.createElement("span", {
|
|
938
959
|
className: styles$b.ctaInner
|
|
939
|
-
},
|
|
960
|
+
}, data[lang].button))));
|
|
940
961
|
};
|
|
941
962
|
|
|
942
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-"};
|
|
943
964
|
|
|
944
965
|
var MaterialNote = function MaterialNote(_ref) {
|
|
945
966
|
var data = _ref.block.data,
|
|
967
|
+
lang = _ref.lang,
|
|
946
968
|
styleContext = _ref.styleContext;
|
|
947
969
|
var classNames = [[styles$c.root, true]];
|
|
948
970
|
|
|
@@ -951,7 +973,8 @@ var MaterialNote = function MaterialNote(_ref) {
|
|
|
951
973
|
}
|
|
952
974
|
|
|
953
975
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(DonatesTeaser, {
|
|
954
|
-
styleContext: styleContext
|
|
976
|
+
styleContext: styleContext,
|
|
977
|
+
lang: lang
|
|
955
978
|
}), React__default.createElement("div", {
|
|
956
979
|
"data-testid": "material-note",
|
|
957
980
|
className: makeClassName(classNames)
|
|
@@ -2174,6 +2197,7 @@ var RenderBlocks = function RenderBlocks(_ref) {
|
|
|
2174
2197
|
case 'material_note':
|
|
2175
2198
|
return React__default.createElement(MaterialNote, {
|
|
2176
2199
|
block: block,
|
|
2200
|
+
lang: lang,
|
|
2177
2201
|
styleContext: styleContext
|
|
2178
2202
|
});
|
|
2179
2203
|
|