Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(v2): add style property to theme-classic navbar #3432

Merged
merged 3 commits into from
Sep 11, 2020

Conversation

Simek
Copy link
Contributor

@Simek Simek commented Sep 10, 2020

Motivation

There are Docusaurus users which will prefer the static Navbar design. The idea for this was based on Footer style property, but due to infima restrictions this PR evolved a bit.

The current implementation offers users two style override options - dark and primary. There are based on the classes that infima provides (I'm not familiar with this package at all).

@slorber I would be nice to implement light theme too, but at this moment I'm not sure how to do this cleanly (what's the best way), but I can work on this further with some amount of guidance.

I have also removed 'navbar--light' class because it was always (so wrongly) included and there is no CSS code associated with that class.

This PR also updates the docs and adds new section related to this property.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Feature has been test on the local Docusaurus V2 website.

Related PRs

Preview

Dark

dforcedark

Primary

Screenshot 2020-09-11 005013

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Sep 10, 2020
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Sep 10, 2020

Deploy preview for docusaurus-2 ready!

Built without sensitive environment variables with commit a7c35d9

https://deploy-preview-3432--docusaurus-2.netlify.app

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

What about improving the doc a bit, and maybe consider just a pass-through class/className config option?

@Simek
Copy link
Contributor Author

Simek commented Sep 11, 2020

[...] and maybe consider just a pass-through class/className config option?

@slorber I can prepare separate PR which will add an ability to specify the className parameter for the theme-classic Navbar and Footer.

className parameter is already defined for navbar.items array entries so I would stick to this name.

@slorber slorber added the pr: new feature This PR adds a new API or behavior. label Sep 11, 2020
@slorber
Copy link
Collaborator

slorber commented Sep 11, 2020

Thanks :)

@slorber slorber merged commit 086bee2 into facebook:master Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants