File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,6 @@ const DocSearch = dynamic(
4
4
( ) => import ( "./wrapper" ) . then ( ( mod ) => mod . default ) ,
5
5
{
6
6
ssr : false ,
7
- loading : ( ) => (
8
- < div className = "relative h-8 w-48 appearance-none rounded-lg bg-black/[.05] px-3 py-1.5 pr-2 text-base leading-tight text-gray-500 transition-colors focus:!bg-transparent max-md:ml-6 md:text-sm dark:bg-gray-50/10 dark:text-gray-400" >
9
- Search...
10
- < kbd className = "pointer-events-none absolute right-0 top-0 my-1.5 flex h-5 select-none items-center gap-1 rounded border bg-white px-1.5 font-mono text-[10px] font-medium text-gray-500 transition-opacity contrast-more:border-current contrast-more:text-current max-sm:hidden ltr:right-1.5 rtl:left-1.5 dark:border-gray-100/20 dark:bg-black/50 contrast-more:dark:border-current" >
11
- CTRL K
12
- </ kbd >
13
- </ div >
14
- ) ,
15
7
}
16
8
)
17
9
Original file line number Diff line number Diff line change 1
1
import { DocSearch } from "@docsearch/react"
2
+ import { useTheme } from "nextra-theme-docs"
3
+ import { useEffect } from "react"
2
4
3
5
import "@docsearch/css"
4
6
5
7
function App ( ) {
8
+ const { resolvedTheme } = useTheme ( )
9
+
10
+ useEffect ( ( ) => {
11
+ if ( resolvedTheme ) {
12
+ // hack to get DocSearch to use dark mode colors if applicable
13
+ document . documentElement . setAttribute ( "data-theme" , resolvedTheme )
14
+ }
15
+ } , [ resolvedTheme ] )
16
+
6
17
return (
7
18
< DocSearch
8
19
appId = { process . env . NEXT_PUBLIC_ALGOLIA_APP_ID ! }
Original file line number Diff line number Diff line change @@ -279,3 +279,9 @@ html > head:has(meta[content*="reference/core/providers"]) + body .provider {
279
279
font-size : 1rem ;
280
280
color : # 000 !important ;
281
281
}
282
+
283
+ .nextra-sidebar-container {
284
+ .DocSearch-Button {
285
+ @apply hidden;
286
+ }
287
+ }
You can’t perform that action at this time.
0 commit comments