Skip to content

Commit

Permalink
Merge pull request #55 from devtron-labs/prtection-config-lib
Browse files Browse the repository at this point in the history
feat: intialAlphabetClassName added in intial function
  • Loading branch information
shivani170 authored Dec 6, 2023
2 parents 27c115e + 4e36afe commit ac5c0f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "0.0.44",
"version": "0.0.45",
"description": "Supporting common component library",
"main": "dist/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/Common/Helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ export function getRandomColor(email: string): string {
return colors[sum % colors.length]
}

export const getAlphabetIcon = (str: string) => {
export const getAlphabetIcon = (str: string, rootClassName: string = "") => {
if (!str) return null
return (
<span
className="alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8"
className={`${rootClassName} alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8`}
style={{ backgroundColor: getRandomColor(str) }}
>
{str[0]}
Expand Down

0 comments on commit ac5c0f5

Please sign in to comment.