Skip to content

Conversation

@rogermparent
Copy link
Contributor

@rogermparent rogermparent commented Jul 12, 2022

storybook-theme-demo.mp4

This PR adds color themes to Storybook, allowing the developer to preview the Light and Dive Bar themes in Storybook on top of the normal dark theme.

These themes are just scraped from VSCode's dev tools by grabbing every rule that sets CSS variables and tossing it into a conditional classname that the plugin adds UI for toggling.

@rogermparent rogermparent changed the title Storybook addon themes Add storybook-addon-themes Jul 12, 2022
@rogermparent rogermparent changed the base branch from main to minor-storybook-touchups July 12, 2022 18:03
@rogermparent rogermparent self-assigned this Jul 12, 2022
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 0460ce7 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (85% is the threshold).

This pull request will bring the total coverage in the repository to 96.7% (0.1% change).

View more on Code Climate.

@rogermparent rogermparent force-pushed the storybook-addon-themes branch from 0460ce7 to 15cdc03 Compare July 12, 2022 18:22
@rogermparent rogermparent marked this pull request as draft July 12, 2022 19:14
@rogermparent rogermparent marked this pull request as ready for review July 12, 2022 21:49
Copy link
Contributor

@mattseddon mattseddon left a comment

Choose a reason for hiding this comment

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

Would be good to add some more of the default themes + One Dark Pro before merging.

@rogermparent
Copy link
Contributor Author

rogermparent commented Jul 13, 2022

Added some more default themes, here's the current list

  • Default Dark
  • Default Light
  • Red
  • Dive Bar
  • One Dark Pro
  • High Contrast Light
  • High Contrast Dark

Video updated with new themes

@rogermparent rogermparent merged commit 3ef65a1 into minor-storybook-touchups Jul 14, 2022
@rogermparent rogermparent deleted the storybook-addon-themes branch July 14, 2022 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants