import React from "react"; import { cn, debounce } from "../utils"; import { InputBase } from "./Input"; interface InputSearchProps { className?: string; onChange?: (val: string) => void; placeholder?: string; debounceTime?: number; } const InputSearchBase = ({ className, onChange, placeholder, debounceTime = 800, }: InputSearchProps) => { const handleSearch = debounce((e: any) => { onChange && onChange(e.target.value ?? ""); }, debounceTime); return ( handleSearch(e)} /> ); }; export function SearchIcon(props: React.SVGProps) { return ( ); } const InputSearch = ({ onSearch }: { onSearch: (kw: string) => void }) => { return (
{ onSearch(val); }} />
); }; export default InputSearch;