IssueStatusBadge

import { Status } from '@prisma/client'
import { Badge, colorProp } from '@radix-ui/themes'
import React from 'react'

const BadgeType: Record<Status, { label: string, color: typeof colorProp.default }> = {
    OPEN: { label: 'Open', color: 'red' },
    IN_PROGRESS: { label: 'In Progress', color: 'violet' },
    CLOSED: { label: 'Closed', color: 'green' }
}

You can use typeof colorProp.default from radix library so you don’t have to manually type every color you want to use in future.

1 Like