storybook-addon-themes
storybook-addon-themes copied to clipboard
Configurable Icon
Hi, could the Icon please be configurable?
Right now it looks like it is pre-filled in as the photo
icon.
https://github.com/tonai/storybook-addon-themes/blob/master/src/manager/ThemeSelector.tsx#L143
<IconButton
key="theme"
active={selectedTheme}
title="Change the theme of the preview"
>
<Icons icon="photo" />
</IconButton>
Do you need a configurable icon, or just a default icon that is different from the one that @storybook/addon-backgrounds
is using? (See the docs at https://storybook.js.org/docs/react/essentials/backgrounds and the related issue #51).
@fvsch I think if we could just set the name of the icon (picking from this list) in the themes
object under .storybook/preview.js
that would resolve the issue. If that's not feasible, changing the icon to something else would also be helpful in differentiating the two addons.
Update: I forked the repo to https://github.com/dhruvkb/storybook-addon-themes and installed the fork via npm
.
$ npm install dhruvkb/storybook-addon-themes#master
It's a workaround but that's all we have until the issue is resolved.
@dhruvkb I like that solution! Would you mind creating a PR on this repo?
@nickofthyme, I've opened #64 with my changes.
Update: Closed #64 because it seems that this project is unmaintained.
Thank you for this PR. It would be very helpful in distinguishing this add-on from the essentials background icon