Skip to content

feat(storybook): add theme toggle - #44234

Merged
ahmaxed merged 1 commit into
freeCodeCamp:mainfrom
sitek94:storybook-theme-toggle
Nov 25, 2021
Merged

ahmaxed merged 1 commit into
freeCodeCamp:mainfrom
sitek94:storybook-theme-toggle

Conversation

@sitek94

@sitek94 sitek94 commented Nov 21, 2021

Copy link
Copy Markdown
Contributor

Checklist:

  • I have read freeCodeCamp's contribution guidelines.
  • My pull request has a descriptive title (not a vague title like Update index.md)
  • My pull request targets the main branch of freeCodeCamp.
  • I have tested these changes either locally on my machine, or GitPod.

Description
This PR provides a slightly improved theme toggle functionality.

  • It works out of the box for all stories - there is no need to wrap an individual story in some kind of provider.
  • Theme can be toggled from the toolbar, as opposed to selecting it from the props
  • The functionality is build on the top of built-in Backgrounds addon

Old
old

New
new

Full preview

storybook.theme.toggle.mov

cc: @ahmadabdolsaheb

@sitek94
sitek94 requested a review from a team November 21, 2021 12:29
@gitpod-io

gitpod-io Bot commented Nov 21, 2021

Copy link
Copy Markdown

@github-actions github-actions Bot added the scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. label Nov 21, 2021
@ghost

ghost commented Nov 21, 2021

Copy link
Copy Markdown

👀 Review this PR in a CodeSee Review Map

Preview the Review Map

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@sitek94 sitek94 mentioned this pull request Nov 21, 2021
4 tasks done
@ahmaxed

ahmaxed commented Nov 25, 2021

Copy link
Copy Markdown
Member

Thank you for implementing the theme toggle from the preview. This is much better than what we have now.

@ahmaxed
ahmaxed merged commit 63f6d9d into freeCodeCamp:main Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants