File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed
ui/user/src/lib/components Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
- import { SearchIcon } from ' lucide-svelte' ;
2
+ import { SearchIcon } from ' lucide-svelte' ;
3
3
import { twMerge } from ' tailwind-merge' ;
4
-
5
- interface Props {
4
+
5
+ interface Props {
6
6
onChange: (value : string ) => void ;
7
7
class? : string ;
8
8
}
9
9
10
- let { onChange, class : klass }: Props = $props ();
10
+ let { onChange, class : klass }: Props = $props ();
11
11
let searchTimeout: ReturnType <typeof setTimeout >;
12
12
13
- function search(e : Event ) {
13
+ function search(e : Event ) {
14
14
const value = (e .target as HTMLInputElement ).value ;
15
15
16
16
// Clear previous timeout
22
22
}, 300 );
23
23
}
24
24
</script >
25
+
25
26
<div class =" relative mb-8 w-full" >
26
- <input
27
- type =" text"
28
- placeholder =" Search Obots..."
29
- class ={twMerge (" peer w-full rounded-xl border-none bg-surface1 px-2.5 py-4 pl-12 focus:outline-none focus:ring-2 focus:ring-blue-500 hover:ring-blue-500 hover:ring-2 transition-all duration-200 ring-2 ring-transparent" , klass )}
30
- oninput ={search }
31
- />
32
- <SearchIcon
33
- class =" absolute left-4 top-1/2 -translate-y-1/2 text-gray peer-focus:text-blue-500"
34
- />
35
- </div >
27
+ <input
28
+ type =" text"
29
+ placeholder =" Search Obots..."
30
+ class ={twMerge (
31
+ ' peer w-full rounded-xl border-none bg-surface1 px-2.5 py-4 pl-12 ring-2 ring-transparent transition-all duration-200 hover:ring-2 hover:ring-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500' ,
32
+ klass
33
+ )}
34
+ oninput ={search }
35
+ />
36
+ <SearchIcon class =" absolute left-4 top-1/2 -translate-y-1/2 text-gray peer-focus:text-blue-500" />
37
+ </div >
You can’t perform that action at this time.
0 commit comments