@carrier-dpx/air-react-library 0.7.28 → 0.7.29

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": "@carrier-dpx/air-react-library",
3
- "version": "0.7.28",
3
+ "version": "0.7.29",
4
4
  "description": "Air web React component library for Figma Make",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -86,13 +86,25 @@ figma.connect(
86
86
  * EXAMPLE CODE TEMPLATE
87
87
  * Shows how StatusLed should be used with optional label
88
88
  */
89
- example: ({ severity, size, labelPosition, showLabel, label }) => (
90
- <StatusLed
91
- severity={severity}
92
- size={size}
93
- labelPosition={labelPosition}
94
- label={showLabel ? label : undefined}
95
- />
96
- ),
89
+ example: ({ severity, size, labelPosition, showLabel, label }) => {
90
+ if (showLabel && label) {
91
+ return (
92
+ <StatusLed
93
+ severity={severity}
94
+ size={size}
95
+ labelPosition={labelPosition}
96
+ label={label}
97
+ />
98
+ );
99
+ }
100
+
101
+ return (
102
+ <StatusLed
103
+ severity={severity}
104
+ size={size}
105
+ labelPosition={labelPosition}
106
+ />
107
+ );
108
+ },
97
109
  }
98
110
  );