import { DropdownMenuRadio } from './Dropdown'; import { Button } from './Button'; import { Input } from './Input'; import { FormEvent } from 'react'; import { IconButton } from './IconButton'; interface Props { sendRequest: () => void; loading: boolean; method: { label: string; value: string }; url: string; onMethodChange: (method: { label: string; value: string }) => void; onUrlChange: (url: string) => void; } export function UrlBar({ sendRequest, loading, onMethodChange, method, onUrlChange, url }: Props) { const handleSendRequest = async (e: FormEvent) => { e.preventDefault(); sendRequest(); }; return (
onUrlChange(e.currentTarget.value)} value={url} placeholder="Enter a URL..." leftSlot={ } rightSlot={ } /> ); }