File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
src/lib/components/lines-and-dots Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,8 @@ export const getNextDistanceAndOffset = (
214214 return { nextDistance, offset } ;
215215} ;
216216
217+ export const DEFAULT_STROKE_COLOR = 'currentColor' ;
218+
217219export const getStatusStrokeColor = (
218220 status : WorkflowStatus | EventClassification | 'Delayed' ,
219221) : string => {
@@ -236,7 +238,7 @@ export const getStatusStrokeColor = (
236238 case 'Delayed' :
237239 return '#fbbf24' ;
238240 default :
239- return 'currentColor' ;
241+ return DEFAULT_STROKE_COLOR ;
240242 }
241243} ;
242244
@@ -263,7 +265,7 @@ export const getCategoryStrokeColor = (
263265 case 'retry' :
264266 return '#FF9B70' ;
265267 default :
266- return 'currentColor' ;
268+ return DEFAULT_STROKE_COLOR ;
267269 }
268270} ;
269271
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import {
3+ DEFAULT_STROKE_COLOR ,
34 getCategoryStrokeColor ,
45 getStatusStrokeColor ,
56 } from ' $lib/components/lines-and-dots/constants' ;
4647 );
4748
4849 const strokeColor = $derived .by (() => {
49- let color = ' currentColor ' ;
50+ let color = DEFAULT_STROKE_COLOR ;
5051 if (status ) {
5152 color = status === ' none' ? ' #141414' : getStatusStrokeColor (status );
5253 }
5354 if (category ) {
54- color = getCategoryStrokeColor (category );
55+ const categoryColor = getCategoryStrokeColor (category );
56+ if (categoryColor !== DEFAULT_STROKE_COLOR ) color = categoryColor ;
5557 }
5658 if (classification ) {
57- color = getStatusStrokeColor (classification );
59+ const statusColor = getStatusStrokeColor (classification );
60+ if (statusColor !== DEFAULT_STROKE_COLOR ) color = statusColor ;
5861 }
5962 if (delayed && [classification , status ].includes (' Running' )) {
6063 color = getStatusStrokeColor (' Delayed' );
You can’t perform that action at this time.
0 commit comments