@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.
@@ -1,3 +1,4 @@
1
1
  export interface DonatesTeaserProps {
2
2
  styleContext: string[] | string;
3
+ lang: 'ru' | 'en';
3
4
  }
@@ -10,4 +10,5 @@ export interface MaterialNoteProps {
10
10
  type: string;
11
11
  };
12
12
  styleContext?: string | string[];
13
+ lang: 'ru' | 'en';
13
14
  }
@@ -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","break":"DonatesTeaser-module_break__3HoGb","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"};
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
- }, "\u0423\xA0\u043D\u0430\u0441 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435\u0442 \u0440\u0435\u043A\u043B\u0430\u043C\u043E\u0434\u0430\u0442\u0435\u043B\u0435\u0439.", ' ', React__default.createElement("span", {
928
- className: styles$b["break"]
929
- }, "\u0417\u0430\u0442\u043E \u0443\xA0\u043D\u0430\u0441 \u0435\u0441\u0442\u044C\xA0\u0432\u044B"), ' ', React__default.createElement("span", {
930
- className: styles$b.text
931
- }, "\u041F\u043E\u043C\u043E\u0433\u0438\u0442\u0435 \u043D\u0430\u043C \u0441\u043F\u0430\u0441\u0442\u0438 \xAB\u041C\u0435\u0434\u0443\u0437\u0443\xBB", ' '))), React__default.createElement("div", {
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: "https://support.meduza.io",
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
- }, "\u0414\u0430\u0442\u044C \u0434\u0435\u043D\u0435\u0433"))));
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