fix(website): apply ThemeProvider to Playbook article layout so dark mode works

LearningArticleLayout replaces PageShell for Playbook articles but never
wrapped itself in a ThemeProvider, so its useTheme() call always fell back
to Primer's light default regardless of the site's actual theme preference.
Split the component into a thin ThemeProvider wrapper plus the existing
implementation (now LearningArticleLayoutBody), matching the pattern already
used by PageShell.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 80686fef-efe3-4cdd-8cd6-bfa61a5d0af6
This commit is contained in:
Aaron Powell
2026-08-17 11:17:20 +10:00
parent e78d479aaf
commit cc3c5aad2a
@@ -17,6 +17,7 @@ import {
Heading,
Section,
Text,
ThemeProvider,
useTheme,
} from "@primer/react-brand";
@@ -144,7 +145,15 @@ export type LearningArticleLayoutProps = {
children: React.ReactNode;
};
export function LearningArticleLayout({
export function LearningArticleLayout(props: LearningArticleLayoutProps) {
return (
<ThemeProvider colorMode="auto">
<LearningArticleLayoutBody {...props} />
</ThemeProvider>
);
}
function LearningArticleLayoutBody({
pageHref,
currentPage,
breadcrumbLabel,