storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
83.45k stars 9.13k forks source link

Export StoryContext type from Storybook core #9726

Open ArrayKnight opened 4 years ago

ArrayKnight commented 4 years ago

Is your feature request related to a problem? Please describe. Currently, if you're running a project in Typescript and you need to add the StoryContext type to the story function, you have to import it from @storybook/addons. This feels like a weird dependency considering the project might not be using any addons.

export const MyStory = (context: StoryContext) => <MyComponent />

Describe the solution you'd like

import { StoryContext } from '@storybook/[framework]'

Are you able to assist bring the feature to reality? No

shilman commented 4 years ago

Thanks @ArrayKnight. We had a types PR to @storybook/csf repo. I hope to clean that up and make it official.

stale[bot] commented 4 years ago

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

shilman commented 4 years ago

We've just released zero-config typescript support in 6.0-beta. Please upgrade and test it!

Thanks for your help and support getting this stable for release!