@bbl-digital/snorre 4.1.47 → 4.1.48

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,8 +11,8 @@ export const MemberBenefitsCard = ({
11
11
  onReadMoreClick,
12
12
  ...props
13
13
  }) => {
14
- const hasDiscountText = !!benefit?.discountText?.trim();
15
- const hasBonusRate = !!benefit?.bonusRate;
14
+ const discountText = benefit?.discountText?.trim();
15
+ const bonusText = benefit?.bonusText?.trim();
16
16
  const hasSituationImage = !!benefit?.urlSituationImage;
17
17
  const hasLogo = !!benefit?.urlLogo;
18
18
  return _jsxs("button", {
@@ -40,20 +40,20 @@ export const MemberBenefitsCard = ({
40
40
  }), benefit?.teaser && _jsx(Html, {
41
41
  text: benefit.teaser
42
42
  })]
43
- }), (hasDiscountText || hasBonusRate) && _jsxs(DiscountAndBonus, {
44
- children: [benefit?.bonusRate && _jsxs(Row, {
43
+ }), (Boolean(bonusText?.length) || Boolean(discountText?.length)) && _jsxs(DiscountAndBonus, {
44
+ children: [!!bonusText && _jsxs(Row, {
45
45
  children: [_jsx(IconMedal, {
46
46
  backgrounded: true
47
- }), _jsxs(Text, {
47
+ }), _jsx(Text, {
48
48
  semibold: true,
49
- children: [benefit.bonusRate, "% bonus"]
49
+ children: bonusText
50
50
  })]
51
- }), benefit?.discountText?.trim() && _jsxs(Row, {
51
+ }), !!discountText && _jsxs(Row, {
52
52
  children: [_jsx(IconPercent, {
53
53
  backgrounded: true
54
54
  }), _jsx(Text, {
55
55
  semibold: true,
56
- children: benefit.discountText
56
+ children: discountText
57
57
  })]
58
58
  })]
59
59
  })]
@@ -11,8 +11,8 @@ export const MemberBenefitsCard = ({
11
11
  onReadMoreClick,
12
12
  ...props
13
13
  }) => {
14
- const hasDiscountText = !!benefit?.discountText?.trim();
15
- const hasBonusRate = !!benefit?.bonusRate;
14
+ const discountText = benefit?.discountText?.trim();
15
+ const bonusText = benefit?.bonusText?.trim();
16
16
  const hasSituationImage = !!benefit?.urlSituationImage;
17
17
  const hasLogo = !!benefit?.urlLogo;
18
18
  return _jsxs("button", {
@@ -40,20 +40,20 @@ export const MemberBenefitsCard = ({
40
40
  }), benefit?.teaser && _jsx(Html, {
41
41
  text: benefit.teaser
42
42
  })]
43
- }), (hasDiscountText || hasBonusRate) && _jsxs(DiscountAndBonus, {
44
- children: [benefit?.bonusRate && _jsxs(Row, {
43
+ }), (Boolean(bonusText?.length) || Boolean(discountText?.length)) && _jsxs(DiscountAndBonus, {
44
+ children: [!!bonusText && _jsxs(Row, {
45
45
  children: [_jsx(IconMedal, {
46
46
  backgrounded: true
47
- }), _jsxs(Text, {
47
+ }), _jsx(Text, {
48
48
  semibold: true,
49
- children: [benefit.bonusRate, "% bonus"]
49
+ children: bonusText
50
50
  })]
51
- }), benefit?.discountText?.trim() && _jsxs(Row, {
51
+ }), !!discountText && _jsxs(Row, {
52
52
  children: [_jsx(IconPercent, {
53
53
  backgrounded: true
54
54
  }), _jsx(Text, {
55
55
  semibold: true,
56
- children: benefit.discountText
56
+ children: discountText
57
57
  })]
58
58
  })]
59
59
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "4.1.47",
3
+ "version": "4.1.48",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",