Skip to content

Commit

Permalink
icon colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheraff committed Jul 8, 2024
1 parent d7dfe64 commit 770d965
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Fragment, useRef, type ElementType } from "react"
import { Fragment, useRef, type ReactElement } from "react"
import type { Step, Event, Task } from 'queue'
import clsx from "clsx"
import { cleanEventName } from "./utils"
Expand Down Expand Up @@ -235,20 +235,20 @@ function StepDisplay({
)}
style={{ top: '0.5em', }}
>
<Icon className="shrink-0 ml-1 h-4 w-4" />
{Icon}
{` ${step.step} `}
</span>
</div>
)
}

const status: Record<Step['status'], ElementType> = {
completed: CircleCheckBig,
failed: CircleX,
pending: CircleDashed,
running: Spin,
stalled: Clock,
waiting: Workflow,
const status: Record<Step['status'], ReactElement> = {
completed: <CircleCheckBig className="shrink-0 ml-1 h-4 w-4 text-emerald-500" />,
failed: <CircleX className="shrink-0 ml-1 h-4 w-4 text-red-500" />,
pending: <CircleDashed className="shrink-0 ml-1 h-4 w-4 text-stone-700 dark:text-stone-300" />,
running: <Spin className="shrink-0 ml-1 h-4 w-4 text-amber-500" />,
stalled: <Clock className="shrink-0 ml-1 h-4 w-4 text-cyan-700 dark:text-cyan-300" />,
waiting: <Workflow className="shrink-0 ml-1 h-4 w-4 text-purple-500" />,
}

function Spin({ className }: { className?: string }) {
Expand Down

0 comments on commit 770d965

Please sign in to comment.