) => void;
+ keyPlaceholder?: string;
+ valuePlaceholder?: string;
+ disabled?: boolean;
+}
+
+export function KeyValueEditor({
+ value,
+ onChange,
+ keyPlaceholder = "Key",
+ valuePlaceholder = "Value",
+ disabled = false,
+}: KeyValueEditorProps) {
+ const [newKey, setNewKey] = useState("");
+ const [newValue, setNewValue] = useState("");
+
+ const handleAdd = () => {
+ if (!newKey.trim()) return;
+ const updated = { ...value, [newKey.trim()]: newValue.trim() };
+ onChange(updated);
+ setNewKey("");
+ setNewValue("");
+ };
+
+ const handleRemove = (key: string) => {
+ const updated = { ...value };
+ delete updated[key];
+ onChange(updated);
+ };
+
+ const handleValueChange = (key: string, val: string) => {
+ const updated = { ...value, [key]: val };
+ onChange(updated);
+ };
+
+ return (
+
+
+
+ {!disabled && (
+
+ )}
+
+ );
+}
diff --git a/frontend/src/pages/HealthPage/components/ProviderHealth/ProviderHealth.tsx b/frontend/src/pages/HealthPage/components/ProviderHealth/ProviderHealth.tsx
index 5c51c30e..98e77552 100644
--- a/frontend/src/pages/HealthPage/components/ProviderHealth/ProviderHealth.tsx
+++ b/frontend/src/pages/HealthPage/components/ProviderHealth/ProviderHealth.tsx
@@ -411,6 +411,7 @@ export function ProviderHealth() {
|