etchteam / storybook-addon-css-variables-theme

Change the CSS variable based design tokens in your storybook on the fly
MIT License
28 stars 12 forks source link

docs/readme still has old info about context.themeId #64

Closed pkyeck closed 5 months ago

pkyeck commented 5 months ago

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

🙏