import StatusBadge from "./StatusBadge"; import { getStatusColors } from "../../utils/statusColors"; interface SelectFieldProps { options: Record; value?: string; onChange: (value: string) => void; label?: string; placeholder?: string; disabled?: boolean; className?: string; statusColorsKey?: string; } export default function SelectField({ options, value, onChange, label, placeholder, disabled, className = "", statusColorsKey, }: SelectFieldProps) { const colors = statusColorsKey ? getStatusColors(statusColorsKey, value) : null; const selectedLabel = value ? (options[value] ?? value) : ""; return (
{label && ( )} {colors && selectedLabel && (
)}
); }