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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/react/src/client/preview/types-6-0.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Component, FunctionComponent } from 'react';
import { ComponentClass, FunctionComponent } from 'react';
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.

type ReactReturnType = StoryFnReactReturnType;

/**
Expand Down