@jobber/components-native 0.84.4-match-mobi-540af48.10 → 0.84.4-match-mobi-3bb95e9.11

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.
@@ -8,7 +8,11 @@ interface StatusLabelProps {
8
8
  /**
9
9
  * Text to display
10
10
  */
11
- readonly text: string;
11
+ readonly text?: string;
12
+ /**
13
+ * Optional children for the status label's label
14
+ */
15
+ readonly children?: React.ReactNode;
12
16
  /**
13
17
  * Alignment of text and StatusIndicator
14
18
  */
@@ -18,5 +22,5 @@ interface StatusLabelProps {
18
22
  */
19
23
  readonly status?: StatusType;
20
24
  }
21
- export declare function StatusLabel({ text, alignment, status, }: StatusLabelProps): React.JSX.Element;
25
+ export declare function StatusLabel({ text, children, alignment, status, }: StatusLabelProps): React.JSX.Element;
22
26
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.84.4-match-mobi-540af48.10+540af48e1",
3
+ "version": "0.84.4-match-mobi-3bb95e9.11+3bb95e964",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -96,5 +96,5 @@
96
96
  "react-native-safe-area-context": "^5.4.0",
97
97
  "react-native-svg": ">=12.0.0"
98
98
  },
99
- "gitHead": "540af48e1dfd90116999584f50bca29c4ab9e0ba"
99
+ "gitHead": "3bb95e964be95042005c0b686e2d749294f3a3d5"
100
100
  }
@@ -21,7 +21,12 @@ interface StatusLabelProps {
21
21
  /**
22
22
  * Text to display
23
23
  */
24
- readonly text: string;
24
+ readonly text?: string;
25
+
26
+ /**
27
+ * Optional children for the status label's label
28
+ */
29
+ readonly children?: React.ReactNode;
25
30
 
26
31
  /**
27
32
  * Alignment of text and StatusIndicator
@@ -36,6 +41,7 @@ interface StatusLabelProps {
36
41
 
37
42
  export function StatusLabel({
38
43
  text,
44
+ children,
39
45
  alignment = "end",
40
46
  status = "success",
41
47
  }: StatusLabelProps) {
@@ -49,16 +55,19 @@ export function StatusLabel({
49
55
  alignment === "start" && styles.labelTextStartAligned,
50
56
  ]}
51
57
  >
52
- <View style={styles.statusLabelText}>
53
- <Typography
54
- align={alignment}
55
- size="smaller"
56
- fontWeight="medium"
57
- color={`${status}OnSurface`}
58
- >
59
- {text}
60
- </Typography>
61
- </View>
58
+ {children && <View>{children}</View>}
59
+ {text && (
60
+ <View style={styles.statusLabelText}>
61
+ <Typography
62
+ align={alignment}
63
+ size="smaller"
64
+ fontWeight="medium"
65
+ color={`${status}OnSurface`}
66
+ >
67
+ {text}
68
+ </Typography>
69
+ </View>
70
+ )}
62
71
  <StatusIndicator status={status} />
63
72
  </View>
64
73
  );