@thecb/components 7.1.0 → 7.1.1-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "7.1.0",
3
+ "version": "7.1.1-beta.0",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
Binary file
@@ -10,9 +10,27 @@ import {
10
10
  GRECIAN_GREY,
11
11
  CHARADE_GREY
12
12
  } from "../../../constants/colors";
13
- import { AccountsAddIcon, PropertiesAddIcon, IconAdd } from "../icons";
13
+ import {
14
+ AccountsAddIcon,
15
+ PropertiesAddIcon,
16
+ IconAdd,
17
+ PaymentMethodAddIcon
18
+ } from "../icons";
14
19
  import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
15
20
 
21
+ const getLargeIcon = iconName => {
22
+ switch (iconName) {
23
+ case "accounts":
24
+ return <AccountsAddIcon />;
25
+ case "properties":
26
+ return <PropertiesAddIcon />;
27
+ case "payments":
28
+ return <PaymentMethodAddIcon />;
29
+ default:
30
+ return <AccountsAddIcon />;
31
+ }
32
+ };
33
+
16
34
  const PlaceholderContentWrapper = ({
17
35
  isLink,
18
36
  action,
@@ -109,11 +127,7 @@ const Placeholder = ({
109
127
  >
110
128
  {variant === "large" ? (
111
129
  <Center intrinsic>
112
- {largeIcon === "accounts" ? (
113
- <AccountsAddIcon />
114
- ) : (
115
- <PropertiesAddIcon />
116
- )}
130
+ {getLargeIcon(largeIcon)}
117
131
  <Text
118
132
  variant="pS"
119
133
  color={themeValues.color}