@@ -19,46 +19,46 @@ export function CustomSearchBox(props: UseSearchBoxProps) {
19
19
}
20
20
21
21
return (
22
- < div >
23
- < form
24
- action = ""
25
- role = "search"
26
- noValidate
27
- onSubmit = { ( event ) => {
28
- event . preventDefault ( )
29
- event . stopPropagation ( )
22
+ < form
23
+ action = ""
24
+ role = "search"
25
+ noValidate
26
+ onSubmit = { ( event ) => {
27
+ event . preventDefault ( )
28
+ event . stopPropagation ( )
30
29
31
- if ( inputRef . current ) {
32
- inputRef . current . blur ( )
33
- }
34
- } }
35
- onReset = { ( event ) => {
36
- event . preventDefault ( )
37
- event . stopPropagation ( )
30
+ if ( inputRef . current ) {
31
+ inputRef . current . blur ( )
32
+ }
33
+ } }
34
+ onReset = { ( event ) => {
35
+ event . preventDefault ( )
36
+ event . stopPropagation ( )
38
37
39
- setQuery ( "" )
38
+ setQuery ( "" )
40
39
41
- if ( inputRef . current ) {
42
- inputRef . current . focus ( )
43
- }
40
+ if ( inputRef . current ) {
41
+ inputRef . current . focus ( )
42
+ }
43
+ } }
44
+ className = "relative"
45
+ >
46
+ < input
47
+ ref = { inputRef }
48
+ autoComplete = "off"
49
+ autoCorrect = "off"
50
+ autoCapitalize = "off"
51
+ placeholder = "Search..."
52
+ spellCheck = { false }
53
+ maxLength = { 512 }
54
+ type = "search"
55
+ value = { inputValue }
56
+ onChange = { ( event ) => {
57
+ setQuery ( event . currentTarget . value )
44
58
} }
45
- className = "relative max-md:ml-6"
46
- >
47
- < input
48
- ref = { inputRef }
49
- autoComplete = "off"
50
- autoCorrect = "off"
51
- autoCapitalize = "off"
52
- placeholder = "Search..."
53
- spellCheck = { false }
54
- maxLength = { 512 }
55
- type = "search"
56
- value = { inputValue }
57
- onChange = { ( event ) => {
58
- setQuery ( event . currentTarget . value )
59
- } }
60
- className = "w-full max-w-48 appearance-none rounded-lg bg-black/[.05] px-3 py-1.5 pr-2 text-base leading-tight transition-colors placeholder:text-gray-500 focus:!bg-transparent md:text-sm dark:bg-gray-50/10 dark:placeholder:text-gray-400"
61
- />
59
+ className = "w-48 appearance-none rounded-lg bg-black/[.05] px-3 py-1.5 pr-2 text-base leading-tight transition-colors placeholder:text-gray-500 focus:!bg-transparent md:text-sm dark:bg-gray-50/10 dark:placeholder:text-gray-400 [aside_&]:w-full"
60
+ />
61
+ < div >
62
62
{ inputValue . length ? (
63
63
< button
64
64
type = "reset"
@@ -98,8 +98,8 @@ export function CustomSearchBox(props: UseSearchBoxProps) {
98
98
CTRL K
99
99
</ kbd >
100
100
) }
101
- < span hidden = { ! isSearchStalled } > Searching… </ span >
102
- </ form >
103
- </ div >
101
+ </ div >
102
+ < span hidden = { ! isSearchStalled } > Searching… </ span >
103
+ </ form >
104
104
)
105
105
}
0 commit comments