import { SetStateAction, useContext } from "react"; import { CustomizeContext } from "../../providers/CustomizeProvider"; import { Search, XCircle } from "react-feather"; interface SearchBarProps { handleInput: (e) => void; searchInput: string; setSearchInput: React.Dispatch>; } export const SearchBar = (props: SearchBarProps) => { const { handleInput, searchInput, setSearchInput } = props; const customSettings = useContext(CustomizeContext); const { borderRadius } = customSettings.customization; return (
handleInput(e.target.value)} placeholder="Search by symbol or address" className="stk-w skt-w-input skt-w-w-full skt-w-border-none skt-w-bg-transparent skt-w-overflow-x-hidden skt-w-overflow-ellipsis" role="search" value={searchInput} spellCheck={false} /> {!!searchInput && ( { setSearchInput(""); handleInput(""); }} /> )}
); };