mirror of
https://github.com/movie-web/movie-web.git
synced 2025-01-15 11:59:10 +01:00
Created an 'x' button to clear search query
This commit is contained in:
parent
39475e4aae
commit
5be4833b8d
@ -57,6 +57,15 @@ export const SearchBarInput = forwardRef<HTMLInputElement, SearchBarProps>(
|
|||||||
className="w-full flex-1 bg-transparent px-4 py-4 pl-12 text-search-text placeholder-search-placeholder focus:outline-none sm:py-4 sm:pr-2"
|
className="w-full flex-1 bg-transparent px-4 py-4 pl-12 text-search-text placeholder-search-placeholder focus:outline-none sm:py-4 sm:pr-2"
|
||||||
placeholder={props.placeholder}
|
placeholder={props.placeholder}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div
|
||||||
|
onClick={() => {
|
||||||
|
setSearch("");
|
||||||
|
}}
|
||||||
|
className="cursor-pointer absolute bottom-0 right-5 top-0 flex max-h-14 items-center text-search-icon"
|
||||||
|
>
|
||||||
|
<Icon icon={Icons.X} />
|
||||||
|
</div>
|
||||||
</Flare.Child>
|
</Flare.Child>
|
||||||
</Flare.Base>
|
</Flare.Base>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user