File tree Expand file tree Collapse file tree 3 files changed +31
-6
lines changed
apps/developer-hub/src/components
packages/component-library/src/AppShell Expand file tree Collapse file tree 3 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -26,4 +26,24 @@ Overrides for Fumadocs content. Everything after prose is MDX generated content
26
26
27
27
# nd-sidebar {
28
28
--fd-sidebar-top : var (--header-height ) !important ;
29
+ position : sticky !important ;
30
+ height : calc (100vh - var (--header-height ));
31
+ }
32
+
33
+ # nd-docs-layout {
34
+ flex-direction : row !important ;
35
+ padding-inline-start : 0 !important ;
36
+ }
37
+
38
+ /* Hacky fix to get the TOC to be sticky */
39
+ # nd-toc {
40
+ top : var (--header-height ) !important ;
41
+ height : max-content;
42
+ position : sticky;
43
+ margin-left : calc (-1 * var (--fd-toc-width ));
44
+ }
45
+
46
+ # nd-toc > div {
47
+ position : relative;
48
+ left : var (--fd-toc-width );
29
49
}
Original file line number Diff line number Diff line change 3
3
import { SearchButton as SearchButtonComponent } from "@pythnetwork/component-library/SearchButton" ;
4
4
import DefaultSearchDialog from "fumadocs-ui/components/dialog/search-default" ;
5
5
import { useCallback , useState } from "react" ;
6
+ import { createPortal } from "react-dom" ;
6
7
7
8
export const SearchButton = ( ) => {
8
9
const [ open , setOpen ] = useState ( false ) ;
@@ -19,11 +20,15 @@ export const SearchButton = () => {
19
20
largeScreenContent = "Search"
20
21
onClick = { handleSearch }
21
22
/>
22
- < DefaultSearchDialog
23
- open = { open }
24
- onOpenChange = { setOpen }
25
- api = "/api/search"
26
- />
23
+ { open &&
24
+ createPortal (
25
+ < DefaultSearchDialog
26
+ open = { open }
27
+ onOpenChange = { setOpen }
28
+ api = "/api/search"
29
+ /> ,
30
+ document . body ,
31
+ ) }
27
32
</ >
28
33
) ;
29
34
} ;
Original file line number Diff line number Diff line change 33
33
background : theme .color (" background" , " primary" );
34
34
border-top-left-radius : calc (var (--offset ) * theme .border-radius (" xl" ));
35
35
border-top-right-radius : calc (var (--offset ) * theme .border-radius (" xl" ));
36
+ height : 100 dvh;
36
37
overflow : hidden auto ;
37
38
transform : scale (calc (100% - (var (--offset ) * 5% )));
38
- height : 100 dvh;
39
39
scrollbar-gutter : stable;
40
40
41
41
.header {
You can’t perform that action at this time.
0 commit comments