import { Input } from "./input.tsx"; export type UrlPrefixInputProps = { id?: string; origin: string; value: string; onInput: (v: string) => void; }; /** * The URL-prefix field, dressed up as the URL it will produce: a fixed origin * affix followed by the editable path segment. */ export function UrlPrefixInput({ id, origin, value, onInput, }: UrlPrefixInputProps) { return (
{origin.replace(/\/+$/, "")} onInput(e.currentTarget.value)} spellcheck={false} autocomplete="off" />
); }