diff --git a/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.js b/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.js index dd91fcabacfd..843c2d82059d 100644 --- a/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.js +++ b/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.js @@ -33,6 +33,7 @@ describe('themeConfig', () => { }, image: 'img/docusaurus-soc.png', navbar: { + style: 'primary', hideOnScroll: true, title: 'Docusaurus', logo: { diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx index b44cd349c914..fe606ba63e92 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx @@ -43,7 +43,12 @@ function Navbar(): JSX.Element { const { siteConfig: { themeConfig: { - navbar: {title = '', items = [], hideOnScroll = false} = {}, + navbar: { + title = '', + items = [], + hideOnScroll = false, + style = undefined, + } = {}, colorMode: {disableSwitch: disableColorModeSwitch = false} = {}, }, }, @@ -83,7 +88,9 @@ function Navbar(): JSX.Element { return (