File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,14 +4,6 @@ const DocSearch = dynamic(
44 ( ) => import ( "./wrapper" ) . then ( ( mod ) => mod . default ) ,
55 {
66 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- ) ,
157 }
168)
179
Original file line number Diff line number Diff line change 11import { DocSearch } from "@docsearch/react"
2+ import { useTheme } from "nextra-theme-docs"
3+ import { useEffect } from "react"
24
35import "@docsearch/css"
46
57function 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+
617 return (
718 < DocSearch
819 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 {
279279 font-size : 1rem ;
280280 color : # 000 !important ;
281281}
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