etchteam/storybook-addon-css-variables-theme

docs/readme still has old info about context.themeId

Closed this issue · 0 comments

this is no longer correct

You can access the currently set theme from the context object provided by storybook as the second parameter.

const Template: ComponentStory<typeof Button> = (args, context) => (
  <Button {...args}>{context.themeId}</Button>
);

I think it should say:

You can access the currently set theme from the context object provided by storybook as the second parameter.

const Template: ComponentStory<typeof Button> = (args, context) => (
  <Button {...args}>{context.globals.cssVariables}</Button>
);

sorry for creating all these issues, I only found them today but don't have any time today to fix them. maybe you do ... otherwise I'll take a look and try to do a PR over the next couple of days

🙏