Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

713 B
Raw Blame
/**
 * Stands in for CustomTimePicker in the place form's tests: a plain text input
 * instead of the portal-heavy picker. The aria props land on the input, as the
 * real picker spreads them onto its own. Hand it to vi.mock as the default export.
 */
export function TimePickerStub({
  value,
  onChange,
  placeholder,
  ...aria
}: {
  value: string;
  onChange: (v: string) => void;
  placeholder?: string;
  'aria-label'?: string;
  'aria-describedby'?: string;
  'aria-invalid'?: boolean;
}) {
  return (
    <input
      {...aria}
      data-testid="time-picker"
      type="text"
      value={value}
      onChange={(e) => onChange(e.target.value)}
      placeholder={placeholder ?? '00:00'}
    />
  );
}