@ledvance/base 1.2.11 → 1.2.12

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
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.2.11",
7
+ "version": "1.2.12",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@reduxjs/toolkit": "^1.8.6",
@@ -11,6 +11,12 @@ export interface AdvancedData {
11
11
  code: string;
12
12
  };
13
13
  }
14
+ export declare enum AdvancedStatus {
15
+ Enable = "enable",
16
+ Disable = "disable",
17
+ Suspend = "suspend"
18
+ }
19
+ export declare function getAdvancedStatusColor(status: AdvancedStatus): string;
14
20
  export interface AdvanceCardProps {
15
21
  data: AdvancedData;
16
22
  onPress: () => void;
@@ -14,6 +14,27 @@ export interface AdvancedData {
14
14
  dp?: { key: string, code: string }
15
15
  }
16
16
 
17
+ const enableStatusColor = 'rgb(0, 201, 49)'
18
+ const suspendStatusColor = '#FFDEAD'
19
+ const disableStatusColor = '#cbcbcb'
20
+
21
+ export enum AdvancedStatus {
22
+ Enable = 'enable',
23
+ Disable = 'disable',
24
+ Suspend = 'suspend',
25
+ }
26
+
27
+ export function getAdvancedStatusColor(status: AdvancedStatus): string {
28
+ switch (status) {
29
+ case AdvancedStatus.Enable:
30
+ return enableStatusColor
31
+ case AdvancedStatus.Suspend:
32
+ return suspendStatusColor
33
+ case AdvancedStatus.Disable:
34
+ return disableStatusColor
35
+ }
36
+ }
37
+
17
38
  export interface AdvanceCardProps {
18
39
  data: AdvancedData
19
40
  onPress: () => void