@redneckz/wildless-cms-uni-blocks 0.3.73 → 0.3.74
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/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +8 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Insurance/Insurance.js +7 -4
- package/dist/components/Insurance/Insurance.js.map +1 -1
- package/dist/components/Insurance/InsuranceContent.d.ts +3 -0
- package/lib/common.css +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Insurance/Insurance.js +7 -4
- package/lib/components/Insurance/Insurance.js.map +1 -1
- package/lib/components/Insurance/InsuranceContent.d.ts +3 -0
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Insurance/Insurance.js +7 -4
- package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
- package/mobile/dist/components/Insurance/InsuranceContent.d.ts +3 -0
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Insurance/Insurance.js +7 -4
- package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
- package/mobile/lib/components/Insurance/InsuranceContent.d.ts +3 -0
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +3 -1
- package/mobile/src/components/Insurance/Insurance.example.json +9 -1
- package/mobile/src/components/Insurance/Insurance.tsx +20 -15
- package/mobile/src/components/Insurance/InsuranceContent.ts +3 -0
- package/package.json +1 -1
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +3 -1
- package/src/components/Insurance/Insurance.example.json +9 -1
- package/src/components/Insurance/Insurance.tsx +20 -15
- package/src/components/Insurance/InsuranceContent.ts +3 -0
|
@@ -10,23 +10,17 @@ export interface InsuranceProps extends InsuranceContent, UniBlockProps {}
|
|
|
10
10
|
export const Insurance = JSX<InsuranceProps>(
|
|
11
11
|
({ className = '', title, description, image, benefits, sum, monthLimit }) => {
|
|
12
12
|
return (
|
|
13
|
-
<section className={`px-[100px] py-[50px] bg-white text-primary-text ${className}`}>
|
|
13
|
+
<section className={`px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`}>
|
|
14
14
|
{title ? <Heading headingType="h3" title={title} className="text-center" /> : null}
|
|
15
15
|
{description ? <div className="text-center text-md mt-3">{description}</div> : null}
|
|
16
16
|
<div>
|
|
17
|
-
<div className="mt-5 mx-auto flex justify-center gap-[
|
|
17
|
+
<div className="mt-5 mx-auto flex justify-center gap-[122px] mt-[30px]">
|
|
18
18
|
{image?.src ? <Img image={image} /> : null}
|
|
19
19
|
<div className="w-[558px] m-auto">
|
|
20
20
|
{benefits ? (
|
|
21
21
|
<div className="flex flex-col gap-4">{benefits.map(renderBenefit)}</div>
|
|
22
22
|
) : null}
|
|
23
|
-
|
|
24
|
-
<div className="bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4">
|
|
25
|
-
{sum ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null}
|
|
26
|
-
{monthLimit
|
|
27
|
-
? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
28
|
-
: null}
|
|
29
|
-
</div>
|
|
23
|
+
{renderInsuranceSumMonth(sum, monthLimit)}
|
|
30
24
|
</div>
|
|
31
25
|
</div>
|
|
32
26
|
</div>
|
|
@@ -37,26 +31,37 @@ export const Insurance = JSX<InsuranceProps>(
|
|
|
37
31
|
|
|
38
32
|
function renderBenefit(benefit: InsuranceBenefit, i: number) {
|
|
39
33
|
return (
|
|
40
|
-
<div key={String(i)} className="flex items-center gap-
|
|
34
|
+
<div key={String(i)} className="flex items-center gap-4">
|
|
41
35
|
{benefit?.icon ? (
|
|
42
36
|
<Img
|
|
43
|
-
className="w-
|
|
37
|
+
className="w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light"
|
|
44
38
|
image={benefit.icon}
|
|
45
|
-
width="24"
|
|
46
|
-
height="24"
|
|
47
39
|
asSVG
|
|
48
40
|
/>
|
|
49
41
|
) : null}
|
|
50
42
|
<div>
|
|
51
|
-
{benefit?.label ? <div className="text-title-2xs">{benefit.label}</div> : null}
|
|
43
|
+
{benefit?.label ? <div className="text-title-2xs font-normal">{benefit.label}</div> : null}
|
|
52
44
|
{benefit?.description ? (
|
|
53
|
-
<div className="mt-
|
|
45
|
+
<div className="mt-0.5 font-light text-secondary-text font-light">
|
|
46
|
+
{benefit.description}
|
|
47
|
+
</div>
|
|
54
48
|
) : null}
|
|
55
49
|
</div>
|
|
56
50
|
</div>
|
|
57
51
|
);
|
|
58
52
|
}
|
|
59
53
|
|
|
54
|
+
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
55
|
+
return sum || monthLimit ? (
|
|
56
|
+
<div className="bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4">
|
|
57
|
+
{Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null}
|
|
58
|
+
{Number.isFinite(monthLimit)
|
|
59
|
+
? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
60
|
+
: null}
|
|
61
|
+
</div>
|
|
62
|
+
) : null;
|
|
63
|
+
}
|
|
64
|
+
|
|
60
65
|
function renderValueBlock(title, sum, isAnotherBlock) {
|
|
61
66
|
const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
|
|
62
67
|
return (
|