Skip to content

Commit 39e9d5e

Browse files
committed
fix: make search icon clickable in URL input
1 parent 7fae7d0 commit 39e9d5e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/components/url-input.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,33 @@ export function UrlInput({ onValidUrl, disabled, className }: UrlInputProps) {
267267
</svg>
268268
)}
269269
{!isSearching && isValid === null && isSearchMode && (
270+
<button
271+
type="button"
272+
onClick={() => {
273+
const trimmed = url.trim();
274+
if (trimmed.length >= 3) {
275+
performSearch(trimmed);
276+
}
277+
}}
278+
className="p-1 rounded hover:bg-muted transition-colors"
279+
title="Search YouTube"
280+
>
281+
<svg
282+
className="w-5 h-5 text-muted-foreground hover:text-foreground"
283+
fill="none"
284+
stroke="currentColor"
285+
viewBox="0 0 24 24"
286+
>
287+
<path
288+
strokeLinecap="round"
289+
strokeLinejoin="round"
290+
strokeWidth={2}
291+
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
292+
/>
293+
</svg>
294+
</button>
295+
)}
296+
{!isSearching && isValid === null && !isSearchMode && !url.trim() && (
270297
<svg
271298
className="w-5 h-5 text-muted-foreground"
272299
fill="none"

0 commit comments

Comments
 (0)