feat(v2): add isCloseable property for theme-classic announcement bar (#3388)

* feat(v2): add `isCloseable` property for announcement bar

* correct styling for non-closeable announcement

* fix tests
This commit is contained in:
Bartosz Kaszubowski 2020-09-02 11:41:38 +02:00 committed by GitHub
parent 0d018a88c5
commit e8e16a45d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 12 deletions

View file

@ -87,7 +87,7 @@ module.exports = {
### Announcement bar
Sometimes you want to announce something in your website. Just for such a case, you can add an announcement bar. This is a non-fixed and dismissable panel above the navbar.
Sometimes you want to announce something in your website. Just for such a case, you can add an announcement bar. This is a non-fixed and optionally dismissable panel above the navbar.
```js {4-10} title="docusaurus.config.js"
module.exports = {
@ -99,6 +99,7 @@ module.exports = {
'We are looking to revamp our docs, please fill <a target="_blank" rel="noopener noreferrer" href="#">this survey</a>',
backgroundColor: '#fafbfc', // Defaults to `#fff`.
textColor: '#091E42', // Defaults to `#000`.
isCloseable: false, // Defaults to `true`.
},
// ...
},