Skip to content

Commit 4ff9b84

Browse files
committed
fix(colors): simplify workflowBorderColor to single string | undefined signature
1 parent fccf98d commit 4ff9b84

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

apps/sim/lib/workspaces/colors.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,8 @@ function withAlpha(hexColor: string, alpha: number): string {
7979

8080
/**
8181
* Returns the hex color with 60/ff (~38%) alpha — used for workflow color border accents.
82-
*
83-
* @param color - A hex color string (e.g. `#2ABBF8`)
84-
* @returns The color string with `60` appended as the hex alpha channel
82+
* Returns `undefined` when `color` is undefined so callers can pass it directly to `borderColor`.
8583
*/
86-
export function workflowBorderColor(color: string): string
87-
export function workflowBorderColor(color: string | undefined): string | undefined
8884
export function workflowBorderColor(color: string | undefined): string | undefined {
8985
return color ? `${color}60` : undefined
9086
}

0 commit comments

Comments
 (0)