storybook-addon-themes icon indicating copy to clipboard operation
storybook-addon-themes copied to clipboard

Configurable Icon

Open scottnath opened this issue 3 years ago • 5 comments

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>

scottnath avatar Apr 08 '21 16:04 scottnath

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 avatar Apr 16 '21 13:04 fvsch

@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 avatar May 06 '21 11:05 dhruvkb

@dhruvkb I like that solution! Would you mind creating a PR on this repo?

nickofthyme avatar Jul 12 '21 18:07 nickofthyme

@nickofthyme, I've opened #64 with my changes.

Update: Closed #64 because it seems that this project is unmaintained.

dhruvkb avatar Jul 13 '21 00:07 dhruvkb

Thank you for this PR. It would be very helpful in distinguishing this add-on from the essentials background icon

RiteshMakan avatar Jul 21 '21 19:07 RiteshMakan