import { Button } from './core/Button'; import { DropdownMenuRadio, DropdownMenuTrigger } from './core/Dropdown'; import { IconButton } from './core/IconButton'; import { Input } from './core/Input'; interface Props { sendRequest: () => void; loading: boolean; method: string; url: string; onMethodChange: (method: string) => void; onUrlChange: (url: string) => void; } export function UrlBar({ sendRequest, loading, onMethodChange, method, onUrlChange, url }: Props) { return (
{ e.preventDefault(); sendRequest(); }} className="w-full flex items-center" > onMethodChange(v.value)} value={method.toUpperCase()} items={[ { label: 'GET', value: 'GET' }, { label: 'PUT', value: 'PUT' }, { label: 'POST', value: 'POST' }, { label: 'PATCH', value: 'PATCH' }, { label: 'DELETE', value: 'DELETE' }, { label: 'OPTIONS', value: 'OPTIONS' }, { label: 'HEAD', value: 'HEAD' }, ]} > } rightSlot={ } /> ); }