hipstersmoothie / storybook-dark-mode

A storybook addon that lets your users toggle between dark and light mode.
MIT License
429 stars 56 forks source link

feat: Add ability to toggle multiple light/dark classes #220

Closed chris-dura closed 1 year ago

chris-dura commented 1 year ago

BREAKING CHANGE: lightClass and darkClass have changed from string to string[]. Before: darkClass: 'my-dark-class', after: darkClass: ['my-dark-class']

hipstersmoothie commented 1 year ago

Could you arrayify the class instead?

chris-dura commented 1 year ago

Could you arrayify the class instead?

yep, I'm just not a fan of union types, so wanted to get your opinion :)

chris-dura commented 1 year ago

This should be a backwards compatible way to support both a single 'myClass' string, a ['myClass'] array, and a multiple string ['my', 'class', 'names'] array.

hipstersmoothie commented 1 year ago

@chris-dura Thanks for the contribution!

hipstersmoothie commented 1 year ago

:rocket: PR was released in v2.1.0 :rocket: