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

refactor(v2): split out dark mode toggle so it is easily swizzle-able #2013

Merged
merged 1 commit into from
Nov 22, 2019

Conversation

endiliey
Copy link
Contributor

@endiliey endiliey commented Nov 19, 2019

Motivation

Some refactoring ... Split components out.
Some people might want a different toggle ...

Feel free to close if this is not needed

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

  • Toggle is still working on netlify
  • Toggle is swizzle-able

@endiliey endiliey added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Nov 19, 2019
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 19, 2019
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Nov 19, 2019

Deploy preview for docusaurus-2 ready!

Built with commit 78ff7d3

https://deploy-preview-2013--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Nov 19, 2019

Deploy preview for docusaurus-preview ready!

Built with commit 78ff7d3

https://deploy-preview-2013--docusaurus-preview.netlify.com

@wgao19
Copy link
Contributor

wgao19 commented Nov 20, 2019

should we take this chance to migrate the hook to an observer then?

@endiliey
Copy link
Contributor Author

Feel free to takeover PR or send a new one if u prefer :). I am not sure if I can create a resilient and good observer hook for this. I like @lex111 approach using simple subscription method.

This PR is only splitting out the component so someone can switch the toggle out to something else. Like how I changed the sun moon icon in endiliey.com

@endiliey endiliey requested a review from yangshun November 20, 2019 17:31
@endiliey endiliey merged commit 4fab29f into master Nov 22, 2019
@endiliey endiliey deleted the endi/toggle branch November 22, 2019 05:31
@endiliey endiliey restored the endi/toggle branch November 22, 2019 05:31
@endiliey endiliey deleted the endi/toggle branch November 22, 2019 05:31
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: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants