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

Set storybook to be based on light theme #1048

Merged
merged 1 commit into from
Nov 10, 2021
Merged

Conversation

davidwinter
Copy link
Contributor

If your OS (such as macOS) is set to use the dark theme, some browsers (like Firefox) pass this through to Storybook which will then use the dark theme as default. This means components will then not have a white background when viewing them within Storybook.

This PR sets the base theme to be the light Storybook theme, regardless of what your OS setting is, as the components are meant to be placed on a white background.

Changed from:

image

To:

image

Checklist:

  • Documentation N/A
  • Tests N/A
  • Ready to be merged

If your OS (such as macOS) is set to use the dark theme, some browsers pass this through to Storybook which will then use the dark theme as default. This means components will then not have a white background when viewing within Storybook.

This commit set the base theme to be the 'light' Storybook theme, regardless of what your OS setting is, as the components are meant to be placed on a white background.
@penx
Copy link
Member

penx commented Nov 10, 2021

Thanks! I think I'd prefer the canvas background to be set to white, and still allow storybook to be dark theme, but this is definitely an improvement as-is so will merge it in.

@penx penx merged commit ad1f147 into govuk-react:main Nov 10, 2021
@davidwinter davidwinter deleted the patch-1 branch November 10, 2021 12:47
@davidwinter
Copy link
Contributor Author

@penx possible to have this deployed to GitHub Pages before the next version release?

https://govuk-react.github.io/govuk-react

@penx
Copy link
Member

penx commented Nov 10, 2021

@davidwinter that should be done, are you able to test and let me know?

@davidwinter
Copy link
Contributor Author

Sorry for delay @penx - just to confirm this is now working as expected 👍

@penx penx mentioned this pull request Apr 8, 2022
penx added a commit that referenced this pull request Apr 8, 2022
- Set storybook to be based on light theme #1048
- Fix warning from LoadingBox #1068 #1065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants