* start SidebarNav, enable dark mode * wip: sidebarnav, fix primer components theme rendering * feat: ProductSiteTree, useFeatureFlag * feat: add new product site tree (untested) * wire up HomepageVersionPicker, run lint * fix: remove re-render logic, fix homepage version picker to be natural width * fix: support css + primer/components color modes * fix: rename categoryId -> productId * feat: ProductSiteTree and AllArticlesProduct * fix: cleanup warnings * fix: use next links on ProductSiteTreeNew * fix: use next Link on AllArticlesProduct * fix: add tooltip to ScrollButton, remove stylesheet dependency * feat: ProductArticlesList component * fix: convert color_mode value from cookie when necessary * remove comments * replace liquid with jsx Co-authored-by: Rachael Sewell <rachmari@github.com>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import Head from 'next/head'
|
|
|
|
import { SidebarNav } from 'components/SidebarNav'
|
|
import { Header } from 'components/Header'
|
|
import { SmallFooter } from 'components/SmallFooter'
|
|
import { ScrollButton } from 'components/ScrollButton'
|
|
import { SupportSection } from 'components/SupportSection'
|
|
import { DeprecationBanner } from 'components/DeprecationBanner'
|
|
import { useMainContext } from 'components/context/MainContext'
|
|
|
|
type Props = { children?: React.ReactNode }
|
|
export const DefaultLayout = (props: Props) => {
|
|
const { builtAssets, expose } = useMainContext()
|
|
return (
|
|
<div className="d-lg-flex">
|
|
<Head>
|
|
<link rel="stylesheet" href={builtAssets.main.css} />
|
|
<script id="expose" type="application/json" dangerouslySetInnerHTML={{ __html: expose }} />
|
|
<script src={builtAssets.main.js} />
|
|
</Head>
|
|
<SidebarNav />
|
|
|
|
<main className="width-full">
|
|
<Header />
|
|
<DeprecationBanner />
|
|
|
|
{props.children}
|
|
|
|
<SupportSection />
|
|
<SmallFooter />
|
|
<ScrollButton />
|
|
</main>
|
|
</div>
|
|
)
|
|
}
|