Files
yaak-mountain-loop/src-web/components/UrlParameterEditor.tsx
2024-06-03 14:00:40 -07:00

23 lines
600 B
TypeScript

import type { HttpRequest } from '../lib/models';
import { PairEditor } from './core/PairEditor';
type Props = {
forceUpdateKey: string;
urlParameters: HttpRequest['headers'];
onChange: (headers: HttpRequest['urlParameters']) => void;
};
export function UrlParametersEditor({ urlParameters, forceUpdateKey, onChange }: Props) {
return (
<PairEditor
valueAutocompleteVariables
nameAutocompleteVariables
namePlaceholder="param_name"
valuePlaceholder="Value"
pairs={urlParameters}
onChange={onChange}
forceUpdateKey={forceUpdateKey}
/>
);
}