import { MWQuery } from "@/backend/metadata/types/mw"; import { Icon, Icons } from "./Icon"; import { TextInputControl } from "./text-inputs/TextInputControl"; export interface SearchBarProps { placeholder?: string; onChange: (value: MWQuery, force: boolean) => void; onUnFocus: () => void; value: MWQuery; } export function SearchBarInput(props: SearchBarProps) { function setSearch(value: string) { props.onChange( { ...props.value, searchQuery: value, }, false ); } return (
setSearch(val)} value={props.value.searchQuery} className="w-full flex-1 bg-transparent px-4 py-4 pl-12 text-white placeholder-denim-700 focus:outline-none sm:py-4 sm:pr-2" placeholder={props.placeholder} />
); }