@@ -37,7 +37,7 @@ export default function DocSearch() {
3737 return (
3838 < Link
3939 href = { href }
40- className = "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-4 py-3 text-sm text-inherit outline-none hover:bg-accent hover:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
40+ className = "hover:bg-accent hover:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-4 py-3 text-sm text-inherit outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
4141 >
4242 { children }
4343 </ Link >
@@ -50,10 +50,10 @@ export default function DocSearch() {
5050 < div className = "hidden md:block" >
5151 < Button
5252 variant = "outline"
53- className = "relative h-8 w-full justify-start rounded-[0.5rem] bg-muted/50 text-sm font-normal text-muted-foreground shadow-none sm:pr-12 md:w-32 lg:w-48 xl:w-56"
53+ className = "bg-muted/50 text-muted-foreground relative h-8 w-full justify-start rounded-[0.5rem] text-sm font-normal shadow-none sm:pr-12 md:w-32 lg:w-48 xl:w-56"
5454 >
5555 < span className = "inline-flex" > Try Search</ span >
56- < kbd className = "pointer-events-none absolute right -[0.3rem] top -[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 sm:flex" >
56+ < kbd className = "bg-muted pointer-events-none absolute top -[0.3rem] right -[0.3rem] hidden h-5 items-center gap-1 rounded border px-1.5 font-mono text-[10px] font-medium opacity-100 select-none sm:flex" >
5757 < span className = "text-xs" > ⌘</ span > K
5858 </ kbd >
5959 </ Button >
@@ -67,7 +67,7 @@ export default function DocSearch() {
6767 </ DialogHeader >
6868
6969 < div className = "flex items-center border-b px-3" >
70- < Search className = "mr-2 h-4 w -4 shrink-0 opacity-50" />
70+ < Search className = "mr-2 size -4 shrink-0 opacity-50" />
7171 < Input
7272 className = "border-none focus-visible:ring-0"
7373 placeholder = "搜索文章"
@@ -83,7 +83,7 @@ export default function DocSearch() {
8383 </ div >
8484 ) }
8585 { searchList . length > 0 && (
86- < ScrollArea className = "max-h-[300px] overflow-y-auto overflow-x-hidden px-2 py-1 text-foreground md:max-h-[calc(100vh-300px)]" >
86+ < ScrollArea className = "text-foreground max-h-[300px] overflow-x-hidden overflow-y-auto px-2 py-1 md:max-h-[calc(100vh-300px)]" >
8787 { searchList . map ( ( item ) => {
8888 if ( item . doc . type == 'heading' ) {
8989 return (
@@ -97,7 +97,7 @@ export default function DocSearch() {
9797 < File />
9898 < div >
9999 < div className = "line-clamp-2 w-full" > { item . doc . content } </ div >
100- < div className = "overflow-hidden text-xs font-bold text-muted-foreground " >
100+ < div className = "text-muted-foreground overflow-hidden text-xs font-bold" >
101101 { item . doc . headings }
102102 </ div >
103103 </ div >
0 commit comments