@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.
@@ -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
  }
@@ -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
- }, "\u0412\u044B\xA0\u0447\u0438\u0442\u0430\u043B\u0438 \xAB\u041C\u0435\u0434\u0443\u0437\u0443\xBB. \u0412\u044B\xA0\u0441\u043B\u0443\u0448\u0430\u043B\u0438 \xAB\u041C\u0435\u0434\u0443\u0437\u0443\xBB. \u0412\u044B\xA0\u0441\u043C\u043E\u0442\u0440\u0435\u043B\u0438 \xAB\u041C\u0435\u0434\u0443\u0437\u0443\xBB", " ", React__default.createElement("span", {
928
- className: styles$b.text
929
- }, "\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", {
930
953
  className: styles$b.cta
931
954
  }, React__default.createElement("a", {
932
- href: "https://support.meduza.io",
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
- }, "\u0414\u0430\u0442\u044C \u0434\u0435\u043D\u0435\u0433"))));
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