mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 00:39:45 +02:00
feat(v2): add style property to theme-classic navbar (#3432)
* feat(v2): add style property to theme-classic navbar * revert config test change * review changes
This commit is contained in:
parent
c0ce83f243
commit
086bee287d
4 changed files with 29 additions and 2 deletions
|
@ -304,6 +304,24 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
### Navbar style
|
||||
|
||||
You can set the static Navbar style without disabling the theme switching ability. The selected style will always apply no matter which theme user have selected.
|
||||
|
||||
Currently, there are two possible style options: `dark` and `primary` (based on the `--ifm-color-primary` color). You can see the styles preview in the [Infima documentation](https://facebookincubator.github.io/infima/docs/components/navbar/).
|
||||
|
||||
```js {5} title="docusaurus.config.js"
|
||||
module.exports = {
|
||||
// ...
|
||||
themeConfig: {
|
||||
navbar: {
|
||||
style: 'primary',
|
||||
},
|
||||
// ...
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
<!--
|
||||
|
||||
## Footer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue