UNPKG

@orchestrator-ui/orchestrator-ui-components

Version:

Library of UI Components used to display the workflow orchestrator frontend

15 lines (12 loc) 342 B
import { TimelinePosition } from './WfoTimeline'; export const getTimelinePosition = ( index: number, indexOfCurrentStep: number, ) => { if (index === indexOfCurrentStep) { return TimelinePosition.CURRENT; } return index < indexOfCurrentStep ? TimelinePosition.PAST : TimelinePosition.FUTURE; };