@devtron-labs/devtron-fe-common-lib 0.0.44 → 0.0.45
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/dist/Common/Helper.d.ts +1 -1
- package/dist/Common/Types.d.ts +1 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/Common/Helper.tsx +2 -2
- package/src/Common/Types.ts +1 -0
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare function sortCallback(key: string, a: any, b: any, isCaseSensitiv
|
|
|
12
12
|
export declare const stopPropagation: (event: any) => void;
|
|
13
13
|
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
|
14
14
|
export declare function getRandomColor(email: string): string;
|
|
15
|
-
export declare const getAlphabetIcon: (str: string) => JSX.Element;
|
|
15
|
+
export declare const getAlphabetIcon: (str: string, intialAlphabetClassName?: string) => JSX.Element;
|
|
16
16
|
export declare const getEmptyArrayOfLength: (length: number) => unknown[];
|
|
17
17
|
export declare function noop(...args: any[]): any;
|
|
18
18
|
export declare function not(e: any): boolean;
|
package/dist/Common/Types.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -9956,10 +9956,10 @@ function getRandomColor(email) {
|
|
|
9956
9956
|
}
|
|
9957
9957
|
return colors$1[sum % colors$1.length];
|
|
9958
9958
|
}
|
|
9959
|
-
var getAlphabetIcon = function (str) {
|
|
9959
|
+
var getAlphabetIcon = function (str, intialAlphabetClassName) {
|
|
9960
9960
|
if (!str)
|
|
9961
9961
|
return null;
|
|
9962
|
-
return (jsxRuntime.jsx("span", __assign({ className: "alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8", style: { backgroundColor: getRandomColor(str) } }, { children: str[0] })));
|
|
9962
|
+
return (jsxRuntime.jsx("span", __assign({ className: "".concat(intialAlphabetClassName ? intialAlphabetClassName : "", " alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8"), style: { backgroundColor: getRandomColor(str) } }, { children: str[0] })));
|
|
9963
9963
|
};
|
|
9964
9964
|
var getEmptyArrayOfLength = function (length) {
|
|
9965
9965
|
return Array.from({ length: length });
|
package/package.json
CHANGED
package/src/Common/Helper.tsx
CHANGED
|
@@ -116,11 +116,11 @@ export function getRandomColor(email: string): string {
|
|
|
116
116
|
return colors[sum % colors.length]
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
export const getAlphabetIcon = (str: string) => {
|
|
119
|
+
export const getAlphabetIcon = (str: string, intialAlphabetClassName?: string) => {
|
|
120
120
|
if (!str) return null
|
|
121
121
|
return (
|
|
122
122
|
<span
|
|
123
|
-
className="alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8
|
|
123
|
+
className={`${intialAlphabetClassName ? intialAlphabetClassName : ""} alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8`}
|
|
124
124
|
style={{ backgroundColor: getRandomColor(str) }}
|
|
125
125
|
>
|
|
126
126
|
{str[0]}
|
package/src/Common/Types.ts
CHANGED