hwookim / storybook-addon-cookie

Set document.cookie for each Storybook.
MIT License
9 stars 3 forks source link

remove redundant stringify #7

Closed aryasaatvik closed 11 months ago

aryasaatvik commented 11 months ago

cookie values should always be strings, not objects. running JSON.stringify wraps the values in redundant quotes.

hwookim commented 11 months ago

That's something I hadn't thought about at all. Thanks for your PR, that's cool! 👍🏼 👍🏼

hwookim commented 10 months ago

While I love the idea of encoding cookies, I realized that this provides unintended behavior for some users. (Like #8 )

Starting with v3.1.0, addon provides the cookieEncoding option. With that option, you can encode the cookies on the panel if you want.

Thanks again for your good PR!