1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
| import {
| RiAlertFill,
| RiCheckboxCircleFill,
| RiErrorWarningLine,
| RiLoader2Line,
| } from '@remixicon/react'
| import cn from '@/utils/classnames'
|
| type NodeStatusIconProps = {
| status: string
| className?: string
| }
| const NodeStatusIcon = ({
| status,
| className,
| }: NodeStatusIconProps) => {
| return (
| <>
| {
| status === 'succeeded' && (
| <RiCheckboxCircleFill className={cn('h-4 w-4 shrink-0 text-text-success', className)} />
| )
| }
| {
| status === 'failed' && (
| <RiErrorWarningLine className={cn('h-4 w-4 shrink-0 text-text-warning', className)} />
| )
| }
| {
| (status === 'stopped' || status === 'exception') && (
| <RiAlertFill className={cn('h-4 w-4 shrink-0 text-text-warning-secondary', className)} />
| )
| }
| {
| status === 'running' && (
| <RiLoader2Line className={cn('h-4 w-4 shrink-0 animate-spin text-text-accent', className)} />
| )
| }
| </>
| )
| }
|
| export default NodeStatusIcon
|
|