import type { InputHTMLAttributes } from "react";

type SearchInputProps = InputHTMLAttributes<HTMLInputElement> & {
  label?: string;
};

export function SearchInput({ label = "Search", className = "", ...props }: SearchInputProps) {
  return (
    <label className={["ui-field", className].filter(Boolean).join(" ")}>
      <span>{label}</span>
      <input className="ui-input" type="search" {...props} />
    </label>
  );
}
