@gisce/react-ooui 1.1.29 → 1.1.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
|
@@ -113,7 +113,7 @@ export default (key: string) => {
|
|
|
113
113
|
return getIconForKey(key);
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
function toCamelCase(key: string)
|
|
116
|
+
function toCamelCase(key: string): string {
|
|
117
117
|
return `${key
|
|
118
118
|
.split("-")
|
|
119
119
|
.map((word) =>
|
|
@@ -125,7 +125,8 @@ function toCamelCase(key: string) : string {
|
|
|
125
125
|
.join("")}`;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
function getIconForKey(
|
|
128
|
+
function getIconForKey(key: string) {
|
|
129
|
+
let IconCamelCase = key.charAt(0).toUpperCase() + key.slice(1); // Capitalize first letter
|
|
129
130
|
if (IconCamelCase.indexOf("-") !== -1) {
|
|
130
131
|
IconCamelCase = toCamelCase(IconCamelCase);
|
|
131
132
|
}
|