Comments (4)
Hey @cgcbrown,
you are absolutely right, the addon should persist the state on story change, but it currently doesn't. There is currently no workaround to solve this, but this is definitely an enhancement I will work on. I already did some research on how I can achieve a persisted state in a storybook addon and I will try to implement it as soon as possible. I will let you know, when the new release is shipped.
from storybook-addon-theme-playground.
I recently released version 2 of the addon including the fix of this issue.
It should work out of the box with your current configuration, but there are some major changes coming with the new release which will be deprecated in future releases. If it doesnt work properly you can check out the migration section in the readme. If you have any issues with the new release, just let me know!
from storybook-addon-theme-playground.
@cgcbrown which version of Storybook are you currently using at your company? I refactored the state handling and removed some custom components in favor of the built in Storybook core components to reduce the bundle size of the addon, but found out that these changes wont work with smaller versions than Storybook v6.
from storybook-addon-theme-playground.
Hey @jeslage,
We are currently using v6.0.22. So we should be all good!
from storybook-addon-theme-playground.
Related Issues (9)
- Missing properties from Type ThemePlaygroundProps - overrides, config HOT 3
- Theme doesn't persist when changing story
- Theme object throws error HOT 4
- Storyshots Invalid hook call when using addon-theme-playground HOT 4
- Panel not loading HOT 3
- Get current theme in decorator function HOT 5
- React 18 Update HOT 13
- Fails to import `lodash` with Yarn 2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storybook-addon-theme-playground.