diff --git a/src/components/LibraryLayout.tsx b/src/components/LibraryLayout.tsx index 4ac073ebd..61b48fb0e 100644 --- a/src/components/LibraryLayout.tsx +++ b/src/components/LibraryLayout.tsx @@ -1442,7 +1442,18 @@ export function LibraryLayout({ ) return ( - + { + document.documentElement.style.setProperty( + '--docs-content-width', + fullWidth ? '100%' : '900px', + ) + setIsFullWidth(fullWidth) + }, + }} + > {children} diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index c3d782a5a..bec6e5ce1 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -55,6 +55,7 @@ import { } from '~/utils/analytics/scarf' import { createPartnerPlacementSessionSeed } from '~/utils/partner-placement' import { twMerge } from 'tailwind-merge' +import { DOCS_WIDTH_BOOTSTRAP } from '~/utils/docs-width' const GOOGLE_ANALYTICS_ID = 'G-JMT1Z50SPS' const GOOGLE_ANALYTICS_PROXY_PREFIX = '/_a' @@ -356,6 +357,7 @@ function ShellComponent({ children }: { children: React.ReactNode }) { dangerouslySetInnerHTML={{ __html: THEME_BOOTSTRAP }} suppressHydrationWarning /> +