@redneckz/wildless-cms-uni-blocks 0.3.72 → 0.3.73

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.
Files changed (86) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +25 -7
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BenefitsBlock/BenefitsBlock.js +21 -3
  5. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  6. package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +39 -12
  7. package/dist/components/Bonus/BonusContent.d.ts +1 -1
  8. package/dist/components/Insurance/Insurance.js.map +1 -1
  9. package/dist/components/Insurance/InsuranceContent.d.ts +16 -2
  10. package/dist/components/PictureText/PictureText.js +1 -1
  11. package/dist/components/PictureText/PictureText.js.map +1 -1
  12. package/dist/components/PictureText/PictureTextContent.d.ts +9 -2
  13. package/dist/components/ProductBlock/ProductBlockContent.d.ts +10 -3
  14. package/dist/components/ProductBlock/renderBenefit.js +1 -1
  15. package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
  16. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  17. package/dist/components/ProductTile/ProductTileContent.d.ts +6 -1
  18. package/lib/common.css +1 -1
  19. package/lib/components/BenefitsBlock/BenefitsBlock.fixture.d.ts +2 -1
  20. package/lib/components/BenefitsBlock/BenefitsBlock.js +21 -3
  21. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  22. package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +39 -12
  23. package/lib/components/Bonus/BonusContent.d.ts +1 -1
  24. package/lib/components/Insurance/Insurance.js.map +1 -1
  25. package/lib/components/Insurance/InsuranceContent.d.ts +16 -2
  26. package/lib/components/PictureText/PictureText.js +1 -1
  27. package/lib/components/PictureText/PictureText.js.map +1 -1
  28. package/lib/components/PictureText/PictureTextContent.d.ts +9 -2
  29. package/lib/components/ProductBlock/ProductBlockContent.d.ts +10 -3
  30. package/lib/components/ProductBlock/renderBenefit.js +1 -1
  31. package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
  32. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  33. package/lib/components/ProductTile/ProductTileContent.d.ts +6 -1
  34. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +21 -3
  35. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  36. package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +39 -12
  37. package/mobile/dist/components/Bonus/BonusContent.d.ts +1 -1
  38. package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
  39. package/mobile/dist/components/Insurance/InsuranceContent.d.ts +16 -2
  40. package/mobile/dist/components/PictureText/PictureText.js +1 -1
  41. package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
  42. package/mobile/dist/components/PictureText/PictureTextContent.d.ts +9 -2
  43. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +10 -3
  44. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  45. package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +6 -1
  46. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +21 -3
  47. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  48. package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +39 -12
  49. package/mobile/lib/components/Bonus/BonusContent.d.ts +1 -1
  50. package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
  51. package/mobile/lib/components/Insurance/InsuranceContent.d.ts +16 -2
  52. package/mobile/lib/components/PictureText/PictureText.js +1 -1
  53. package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
  54. package/mobile/lib/components/PictureText/PictureTextContent.d.ts +9 -2
  55. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +10 -3
  56. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  57. package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +6 -1
  58. package/mobile/src/components/BenefitsBlock/BenefitsBlock.example.json +9 -1
  59. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +48 -12
  60. package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +46 -16
  61. package/mobile/src/components/Bonus/BonusContent.ts +1 -1
  62. package/mobile/src/components/Insurance/Insurance.tsx +2 -3
  63. package/mobile/src/components/Insurance/InsuranceContent.ts +23 -9
  64. package/mobile/src/components/PictureText/PictureText.tsx +6 -7
  65. package/mobile/src/components/PictureText/PictureTextContent.ts +10 -2
  66. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +11 -3
  67. package/mobile/src/components/ProductTile/ProductTile.tsx +1 -2
  68. package/mobile/src/components/ProductTile/ProductTileContent.ts +7 -1
  69. package/package.json +1 -1
  70. package/src/components/BenefitsBlock/BenefitsBlock.example.json +9 -1
  71. package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +72 -9
  72. package/src/components/BenefitsBlock/BenefitsBlock.tsx +48 -12
  73. package/src/components/BenefitsBlock/BenefitsBlockContent.ts +46 -16
  74. package/src/components/Bonus/Bonus.fixture.tsx +3 -3
  75. package/src/components/Bonus/BonusContent.ts +1 -1
  76. package/src/components/Insurance/Insurance.fixture.tsx +2 -2
  77. package/src/components/Insurance/Insurance.tsx +2 -3
  78. package/src/components/Insurance/InsuranceContent.ts +23 -9
  79. package/src/components/PictureText/PictureText.tsx +6 -7
  80. package/src/components/PictureText/PictureTextContent.ts +10 -2
  81. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +3 -3
  82. package/src/components/ProductBlock/ProductBlock.fixture.tsx +2 -3
  83. package/src/components/ProductBlock/ProductBlockContent.ts +11 -3
  84. package/src/components/ProductBlock/renderBenefit.tsx +3 -3
  85. package/src/components/ProductTile/ProductTile.tsx +1 -2
  86. package/src/components/ProductTile/ProductTileContent.ts +7 -1
@@ -2,34 +2,45 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { UniBlockProps } from '../../types';
3
3
  import { Heading } from '../../ui-kit/Heading/Heading';
4
4
  import { Img } from '../../ui-kit/Img/Img';
5
- import type { Benefit, BenefitsBlockContent } from './BenefitsBlockContent';
5
+ import type { BenefitItem, BenefitsBlockContent } from './BenefitsBlockContent';
6
+ import { DescriptionType, ListBenefitDef, TextBenefitDef } from './BenefitsBlockContent';
6
7
 
7
8
  export interface BenefitsBlockProps extends BenefitsBlockContent, UniBlockProps {}
8
9
 
9
10
  export const BenefitsBlock = JSX<BenefitsBlockProps>(
10
- ({ className = '', title, benefits, anchor = null }) => {
11
+ ({ className = '', headingType = 'h2', title, benefitList, anchor = null }) => {
11
12
  return (
12
13
  <section
13
14
  className={`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${className}`}
14
15
  id={anchor}
15
16
  >
16
17
  {title ? (
17
- <Heading headingType="h2" className="max-w-[47rem] text-center" title={title} />
18
- ) : null}
19
- {benefits?.length ? (
20
- <div className="grid grid-cols-2 gap-8 mt-9">{benefits.map(renderStep)}</div>
18
+ <Heading
19
+ headingType={headingType}
20
+ as="h2"
21
+ className="max-w-[47rem] text-center"
22
+ title={title}
23
+ />
21
24
  ) : null}
25
+ {benefitList?.length ? renderBenefits(benefitList) : null}
22
26
  </section>
23
27
  );
24
28
  },
25
29
  );
26
30
 
27
- const renderStep = (benefit: Benefit, i: number) => {
31
+ const renderBenefits = (benefits: BenefitItem[]) => {
32
+ return (
33
+ <div className="flex flex-wrap justify-center gap-x-20 mt-9">{benefits.map(renderStep)}</div>
34
+ );
35
+ };
36
+
37
+ const renderStep = (benefit: BenefitItem, i: number) => {
38
+ const description = benefit?.description || undefined;
28
39
  return (
29
- <div key={String(i)} className="flex items-center gap-5 max-w-[500px]">
40
+ <div key={String(i)} className="flex items-center basis-1/2 max-w-[500px] mb-[46px]">
30
41
  {benefit?.icon ? (
31
42
  <Img
32
- className="h-[70px] w-[70px] min-w-[70px] min-h-[70px]"
43
+ className="h-[70px] w-[70px] min-w-[70px] min-h-[70px] mr-5"
33
44
  image={benefit.icon}
34
45
  width="70"
35
46
  height="70"
@@ -37,10 +48,35 @@ const renderStep = (benefit: Benefit, i: number) => {
37
48
  ) : null}
38
49
  <div>
39
50
  {benefit?.label ? <h3 className="font-medium text-xl m-0">{benefit.label}</h3> : null}
40
- {benefit?.description ? (
41
- <div className="font-normal text-sm mt-2">{benefit.description}</div>
42
- ) : null}
51
+ {renderDescription(description)}
43
52
  </div>
44
53
  </div>
45
54
  );
46
55
  };
56
+
57
+ const renderDescription = (description?: DescriptionType) => {
58
+ const benefitType = description ? description?.benefitType : null;
59
+ if (!benefitType) {
60
+ return null;
61
+ }
62
+ return description ? (
63
+ <div className="font-light text-base text-secondary-text mt-2">
64
+ {benefitType === 'list'
65
+ ? renderListBenefit(description as ListBenefitDef)
66
+ : renderTextBenefit(description as TextBenefitDef)}
67
+ </div>
68
+ ) : null;
69
+ };
70
+
71
+ const renderTextBenefit = (description?: TextBenefitDef) => (description ? description.name : null);
72
+
73
+ const renderListBenefit = (description?: ListBenefitDef) => {
74
+ const listStyleType = description?.bullets ? 'list-disc pl-6' : '';
75
+ return description?.items && description.items.length > 0 ? (
76
+ <ul className={listStyleType}>
77
+ {description.items.map((_, i) => (
78
+ <li key={`benefitListItem-${i}`}>{_}</li>
79
+ ))}
80
+ </ul>
81
+ ) : null;
82
+ };
@@ -1,28 +1,58 @@
1
1
  import type { Picture } from '../../model/Picture';
2
+ import type { HeadingContent, HeadingTypeContent } from '../../ui-kit/Heading/HeadingContent';
3
+ import type { EmptyOption } from '../../model/EmptyOptionType';
2
4
 
3
- export interface TextBenefit {
4
- /** @title Название */
5
- label?: string;
6
- /** @title Описание */
7
- description?: string;
8
- }
5
+ /**
6
+ * @title Пункты описания
7
+ * @default {"benefitType": "text"}
8
+ */
9
+ export type TextBenefitDef = {
10
+ /**
11
+ * @title Описание
12
+ */
13
+ name?: string;
14
+ benefitType?: 'text';
15
+ };
16
+
17
+ /**
18
+ * @title Список
19
+ * @default {"benefitType": "list"}
20
+ */
21
+ export type ListBenefitDef = {
22
+ /** @title Буллиты */
23
+ bullets?: boolean;
24
+ /**
25
+ * @title Пункты
26
+ * @example ["Пункт 1"]
27
+ */
28
+ items?: string[];
29
+ benefitType?: 'list';
30
+ };
31
+
32
+ /**
33
+ * @title Вид контента
34
+ */
35
+ export type DescriptionType = EmptyOption | TextBenefitDef | ListBenefitDef;
9
36
 
10
37
  /**
11
38
  * @title Преимущество
12
39
  */
13
- export interface Benefit extends TextBenefit {
40
+ export interface BenefitItem {
41
+ /** @title Название */
42
+ label?: string;
43
+ /** @title Описание */
44
+ description?: DescriptionType;
14
45
  icon?: Picture;
15
46
  }
16
47
 
17
48
  /**
18
49
  * @title Блок преимущества
19
50
  */
20
- export interface BenefitsBlockContent {
21
- /** @title Заголовок */
22
- title?: string;
23
- /**
24
- * @title Список преимуществ
25
- * @maxItems 6
26
- */
27
- benefits?: Benefit[];
28
- }
51
+ export type BenefitsBlockContent = HeadingContent &
52
+ HeadingTypeContent & {
53
+ /**
54
+ * @title Список преимуществ
55
+ * @maxItems 6
56
+ */
57
+ benefitList?: BenefitItem[];
58
+ };
@@ -11,20 +11,20 @@ export const BONUS: BonusContent = {
11
11
  name: '5 баллов за каждые 100 ₽',
12
12
  description:
13
13
  'Повышенное начисление баллов за операции оплаты товаров и услуг в сети АЗС Роснефть',
14
- bonusCount: 5,
14
+ bonusCount: '5',
15
15
  bonusName: 'баллов',
16
16
  },
17
17
  {
18
18
  name: '1 балл за каждые 100 ₽',
19
19
  description: 'За остальные операции оплаты товаров и услуг',
20
- bonusCount: 1,
20
+ bonusCount: '1',
21
21
  bonusName: 'балл',
22
22
  },
23
23
  {
24
24
  name: '300 приветственных баллов',
25
25
  description:
26
26
  'За операции оплаты товаров и услуг на общую сумму 1 000 рублей и более в течение первых двух месяцев после получения карты',
27
- bonusCount: 300,
27
+ bonusCount: '300',
28
28
  bonusName: 'баллов',
29
29
  },
30
30
  ],
@@ -8,7 +8,7 @@ interface BonusItems {
8
8
  /** @title Описание плитки */
9
9
  description?: string;
10
10
  /** @title Количество баллов */
11
- bonusCount?: number;
11
+ bonusCount?: string;
12
12
  /** @title Наименование */
13
13
  bonusName?: string;
14
14
  }
@@ -1,9 +1,9 @@
1
1
  import { Picture } from '../../model/Picture';
2
2
  import { context } from '../../react/setup-fixture';
3
- import { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
3
+ import type { InsuranceBenefit } from './InsuranceContent';
4
4
  import { Insurance } from './Insurance';
5
5
 
6
- const benefits: Benefit[] = [
6
+ const benefits: InsuranceBenefit[] = [
7
7
  {
8
8
  label: 'Телесное повреждение',
9
9
  description: 'Описание',
@@ -3,8 +3,7 @@ import type { UniBlockProps } from '../../types';
3
3
  import { Heading } from '../../ui-kit/Heading/Heading';
4
4
  import { Img } from '../../ui-kit/Img/Img';
5
5
  import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
6
- import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
7
- import type { InsuranceContent } from './InsuranceContent';
6
+ import type { InsuranceBenefit, InsuranceContent } from './InsuranceContent';
8
7
 
9
8
  export interface InsuranceProps extends InsuranceContent, UniBlockProps {}
10
9
 
@@ -36,7 +35,7 @@ export const Insurance = JSX<InsuranceProps>(
36
35
  },
37
36
  );
38
37
 
39
- function renderBenefit(benefit: Benefit, i: number) {
38
+ function renderBenefit(benefit: InsuranceBenefit, i: number) {
40
39
  return (
41
40
  <div key={String(i)} className="flex items-center gap-5">
42
41
  {benefit?.icon ? (
@@ -1,12 +1,26 @@
1
1
  import type { Picture } from '../../model/Picture';
2
- import type { BenefitsBlockContent } from '../BenefitsBlock/BenefitsBlockContent';
3
2
  import type { InsuranceProps } from '../../model/Insurance';
4
3
 
5
- export type InsuranceContent = BenefitsBlockContent &
6
- InsuranceProps & {
7
- /** @title Заголовок */
8
- title?: string;
9
- /** @title Описание */
10
- description?: string;
11
- image?: Picture;
12
- };
4
+ /**
5
+ * @title Преимущество
6
+ */
7
+ export interface InsuranceBenefit {
8
+ /** @title Название */
9
+ label?: string;
10
+ /** @title Описание */
11
+ description?: string;
12
+ icon?: Picture;
13
+ }
14
+
15
+ export type InsuranceContent = InsuranceProps & {
16
+ /** @title Заголовок */
17
+ title?: string;
18
+ /** @title Описание */
19
+ description?: string;
20
+ image?: Picture;
21
+ /**
22
+ * @title Список преимуществ
23
+ * @maxItems 6
24
+ */
25
+ benefits?: InsuranceBenefit[];
26
+ };
@@ -1,11 +1,10 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { UniBlockProps } from '../../types';
3
- import type { PictureTextContent } from './PictureTextContent';
3
+ import type { PictureTextContent, PictureTextBenefit } from './PictureTextContent';
4
4
 
5
5
  import { BlockVersion } from '../../model/BlockVersion';
6
6
  import { Heading } from '../../ui-kit/Heading/Heading';
7
7
  import { Img } from '../../ui-kit/Img/Img';
8
- import { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
9
8
 
10
9
  export interface PictureTextProps extends PictureTextContent, UniBlockProps {}
11
10
 
@@ -43,7 +42,7 @@ export const PictureText = JSX<PictureTextProps>(
43
42
  },
44
43
  );
45
44
 
46
- function renderBenefit(benefit: Benefit, i: number, version: string) {
45
+ function renderBenefit(benefit: PictureTextBenefit, i: number, version: string) {
47
46
  return (
48
47
  <div key={String(i)} className="flex flex-row mb-8">
49
48
  {benefit.icon ? (
@@ -56,7 +55,7 @@ function renderBenefit(benefit: Benefit, i: number, version: string) {
56
55
  />
57
56
  ) : null}
58
57
  <div className="flex gap-1 flex-col h-full ml-5 max-w-[490px]">
59
- {benefit.label && (
58
+ {benefit?.label ? (
60
59
  <div
61
60
  className={`font-medium text-xl m-0 ${
62
61
  version === 'primary' ? 'text-primary-text' : ''
@@ -64,14 +63,14 @@ function renderBenefit(benefit: Benefit, i: number, version: string) {
64
63
  >
65
64
  {benefit.label}
66
65
  </div>
67
- )}
68
- {benefit.description && (
66
+ ) : null}
67
+ {benefit?.description ? (
69
68
  <div
70
69
  className={`font-normal text-sm ${version === 'primary' ? 'text-secondary-text' : ''}`}
71
70
  >
72
71
  {benefit.description}
73
72
  </div>
74
- )}
73
+ ) : null}
75
74
  </div>
76
75
  </div>
77
76
  );
@@ -1,17 +1,25 @@
1
1
  import { BlockVersion } from '../../model/BlockVersion';
2
2
  import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
3
3
  import type { ImageContent } from '../../ui-kit/Img/ImgProps';
4
- import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
4
+ import type { Picture } from '../../model/Picture';
5
5
 
6
6
  export type TitleWithImageContent = HeadingContent & ImageContent;
7
7
 
8
+ export interface PictureTextBenefit {
9
+ icon?: Picture;
10
+ /** @title Название */
11
+ label?: string;
12
+ /** @title Описание */
13
+ description?: string;
14
+ }
15
+
8
16
  /**
9
17
  * @title Картинка с текстом
10
18
  */
11
19
  export interface PictureTextContent extends TitleWithImageContent {
12
20
  version?: BlockVersion;
13
21
  /** @title Список преимуществ */
14
- benefits?: Benefit[];
22
+ benefits?: PictureTextBenefit[];
15
23
  /**
16
24
  * @title Картинка справа/текст слева
17
25
  * @default false
@@ -1,8 +1,8 @@
1
1
  import type { Picture } from '../../model/Picture';
2
2
  import { context } from '../../react/setup-fixture';
3
- import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
4
- import { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
5
3
  import { ProductBlock } from './ProductBlock';
4
+ import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
5
+ import type { ProductBlockBenefit } from './ProductBlockContent';
6
6
 
7
7
  const title = 'Кредит до 5 000 000 Р\nбез залога и поручителей';
8
8
  const description =
@@ -25,7 +25,7 @@ const image: Picture = {
25
25
  ],
26
26
  };
27
27
 
28
- const benefits: Benefit[] = [
28
+ const benefits: ProductBlockBenefit[] = [
29
29
  {
30
30
  label: 'До 5 млн ₽',
31
31
  description: 'Кредитный лимит',
@@ -1,9 +1,8 @@
1
1
  import type { Picture } from '../../model/Picture';
2
2
  import { context } from '../../react/setup-fixture';
3
3
  import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
4
- import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
5
4
  import { ProductBlock } from './ProductBlock';
6
- import type { ProductBlockContent } from './ProductBlockContent';
5
+ import type { ProductBlockContent, ProductBlockBenefit } from './ProductBlockContent';
7
6
 
8
7
  const image: Picture = {
9
8
  src: 'money-1.png',
@@ -15,7 +14,7 @@ const image: Picture = {
15
14
  },
16
15
  };
17
16
 
18
- const benefits: Benefit[] = [
17
+ const benefits: ProductBlockBenefit[] = [
19
18
  {
20
19
  label: 'До 5 млн ₽',
21
20
  description: 'Кредитный лимит',
@@ -6,10 +6,18 @@ import type { DescriptionContent } from '../../ui-kit/Description/DescriptionCon
6
6
  import type { HeadingContent, HeadingTypeContent } from '../../ui-kit/Heading/HeadingContent';
7
7
  import type { ImageContent } from '../../ui-kit/Img/ImgProps';
8
8
  import type { ListContent } from '../../ui-kit/List/ListContent';
9
- import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
9
+ import { Picture } from '../../model/Picture';
10
+
11
+ export interface ProductBlockBenefit {
12
+ icon?: Picture;
13
+ /** @title Название */
14
+ label?: string;
15
+ /** @title Описание */
16
+ description?: string;
17
+ }
10
18
 
11
19
  export type BenefitItemProps = {
12
- benefit: Benefit;
20
+ benefit: ProductBlockBenefit;
13
21
  version?: BlockVersion;
14
22
  benefitsVersion?: IconVersion;
15
23
  };
@@ -25,7 +33,7 @@ export type ProductBlockInnerContent = HeadingContent &
25
33
  * @minItems 2
26
34
  * @maxItems 3
27
35
  */
28
- benefits?: Benefit[];
36
+ benefits?: ProductBlockBenefit[];
29
37
  benefitsVersion?: IconVersion;
30
38
  version?: BlockVersion;
31
39
  /**
@@ -27,13 +27,13 @@ export function renderBenefit(
27
27
  asSVG
28
28
  />
29
29
  ) : null}
30
- <div className="flex gap-0.5 flex-col h-full max-w-[149px] min-w-[149px]">
30
+ <div className="flex gap-0.5 flex-col h-full max-w-[149px] min-w-[149px]">
31
31
  <div className={`text-xl m-0 ${benefitTitleStyleMap[version]}`}>{benefit.label}</div>
32
- {benefit.description && (
32
+ {benefit.description ? (
33
33
  <div className={`font-light text-m-md ${benefitDescStyleMap[version]}`}>
34
34
  {benefit.description}
35
35
  </div>
36
- )}
36
+ ) : null}
37
37
  </div>
38
38
  </div>
39
39
  );
@@ -8,8 +8,7 @@ import { Img } from '../../ui-kit/Img/Img';
8
8
  import { BaseTile } from '../BaseTile/BaseTile';
9
9
  import { getTileMinHeight } from '../BaseTile/getTileMinHeight';
10
10
  import { getTileRightPadding } from '../BaseTile/getTileRightPadding';
11
- import type { TextBenefit } from '../BenefitsBlock/BenefitsBlockContent';
12
- import type { ProductTileContent } from './ProductTileContent';
11
+ import type { ProductTileContent, TextBenefit } from './ProductTileContent';
13
12
 
14
13
  export interface ProductTileProps extends ProductTileContent, UniBlockProps {}
15
14
 
@@ -3,7 +3,13 @@ import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
3
3
  import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
4
4
  import type { HeadingContent, HeadingTypeContent } from '../../ui-kit/Heading/HeadingContent';
5
5
  import type { ImageContent } from '../../ui-kit/Img/ImgProps';
6
- import type { TextBenefit } from '../BenefitsBlock/BenefitsBlockContent';
6
+
7
+ export interface TextBenefit {
8
+ /** @title Название */
9
+ label?: string;
10
+ /** @title Описание */
11
+ description?: string;
12
+ }
7
13
 
8
14
  /**
9
15
  * @title Продуктовая плитка