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
2626
2727# nd-sidebar {
2828 --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 );
2949}
Original file line number Diff line number Diff line change 33import { SearchButton as SearchButtonComponent } from "@pythnetwork/component-library/SearchButton" ;
44import DefaultSearchDialog from "fumadocs-ui/components/dialog/search-default" ;
55import { useCallback , useState } from "react" ;
6+ import { createPortal } from "react-dom" ;
67
78export const SearchButton = ( ) => {
89 const [ open , setOpen ] = useState ( false ) ;
@@ -19,11 +20,15 @@ export const SearchButton = () => {
1920 largeScreenContent = "Search"
2021 onClick = { handleSearch }
2122 />
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+ ) }
2732 </ >
2833 ) ;
2934} ;
Original file line number Diff line number Diff line change 3333 background : theme .color (" background" , " primary" );
3434 border-top-left-radius : calc (var (--offset ) * theme .border-radius (" xl" ));
3535 border-top-right-radius : calc (var (--offset ) * theme .border-radius (" xl" ));
36+ height : 100 dvh;
3637 overflow : hidden auto ;
3738 transform : scale (calc (100% - (var (--offset ) * 5% )));
38- height : 100 dvh;
3939 scrollbar-gutter : stable;
4040
4141 .header {
You can’t perform that action at this time.
0 commit comments