@carrier-dpx/air-react-library 0.7.28 → 0.7.30
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
|
@@ -74,25 +74,39 @@ figma.connect(
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* LABEL TEXT CONTENT
|
|
77
|
-
* Maps text
|
|
77
|
+
* Maps text content from the nested "Label" Typography component
|
|
78
78
|
* The Label is an instance of the Typography component
|
|
79
|
-
*
|
|
80
|
-
*
|
|
79
|
+
* Uses nestedProps to access the Label component's children (text content)
|
|
80
|
+
* Similar to how Tooltip accesses nested TooltipContent properties
|
|
81
81
|
*/
|
|
82
|
-
label: figma.
|
|
82
|
+
label: figma.nestedProps("Label", {
|
|
83
|
+
children: figma.children("Label"),
|
|
84
|
+
}),
|
|
83
85
|
},
|
|
84
86
|
|
|
85
87
|
/**
|
|
86
88
|
* EXAMPLE CODE TEMPLATE
|
|
87
89
|
* Shows how StatusLed should be used with optional label
|
|
88
90
|
*/
|
|
89
|
-
example: ({ severity, size, labelPosition, showLabel, label }) =>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
example: ({ severity, size, labelPosition, showLabel, label }) => {
|
|
92
|
+
if (showLabel && label) {
|
|
93
|
+
return (
|
|
94
|
+
<StatusLed
|
|
95
|
+
severity={severity}
|
|
96
|
+
size={size}
|
|
97
|
+
labelPosition={labelPosition}
|
|
98
|
+
label={label.children}
|
|
99
|
+
/>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<StatusLed
|
|
105
|
+
severity={severity}
|
|
106
|
+
size={size}
|
|
107
|
+
labelPosition={labelPosition}
|
|
108
|
+
/>
|
|
109
|
+
);
|
|
110
|
+
},
|
|
97
111
|
}
|
|
98
112
|
);
|