Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React: Fix CSF component typing #12072

Merged
merged 1 commit into from Aug 17, 2020
Merged

React: Fix CSF component typing #12072

merged 1 commit into from Aug 17, 2020

Conversation

shilman
Copy link
Member

@shilman shilman commented Aug 17, 2020

Issue: #12056

What I did

Fixed bad component type for React

@shilman
Copy link
Member Author

shilman commented Aug 17, 2020

Self-merging @ndelangen @tooppaaa @gaetanmaisse

import { Args as DefaultArgs, Annotations, BaseMeta, BaseStory } from '@storybook/addons';
import { StoryFnReactReturnType } from './types';

export { Args, ArgTypes, Parameters, StoryContext } from '@storybook/addons';

type ReactComponent = Component | FunctionComponent<any>;
type ReactComponent = ComponentClass<any> | FunctionComponent<any>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a React.ComponentType<Props> type that can replace this perhaps?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof stof deleted the 12056-fix-csf-component-type branch May 25, 2022 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants