17 lines
549 B
TypeScript
17 lines
549 B
TypeScript
import React from "react";
|
|
import Badge from "./ui/Badge";
|
|
import { STATUS_LABELS, getStatusColors } from "../utils/constants";
|
|
import { useTheme } from "../context/ThemeContext";
|
|
|
|
interface StatusBadgeProps {
|
|
status: string;
|
|
}
|
|
|
|
export default function StatusBadge({ status }: StatusBadgeProps) {
|
|
const { colors } = useTheme();
|
|
const label = STATUS_LABELS[status] || status;
|
|
const statusColors = getStatusColors(colors);
|
|
const color = statusColors[status] || colors.textMuted;
|
|
return <Badge label={label} color={color} />;
|
|
}
|