Describe the bug
It seems like unless the types are in the same file as the Component, it is not shown within @addons/docs prop section.
To Reproduce
The code below for a react component SHOWS props within the docs section.
Button.tsx:
...
type ButtonProps = {
title?: string;
appearance?: 'primary' | 'inverse' | 'invisible';
};
const Button: FC<ButtonProps> = (props: ButtonProps) => {
...
}
Button.stories.tsx:
import React from 'react';
import Button from './Button';
export default {
title: 'Elements|Button',
component: Button
};
const Basic = () => <Button title="test" />
But if I move the ButtonProps type to another file, types table does not work:
...
import { ButtonProps } from './ButtonModels';
const Button: FC<ButtonProps> = (props: ButtonProps) => {
...
}
Expected behavior
Regardless of where the types are exported from, types table should show?
Screenshots

When types exported:

Documented here: https://github.com/storybookjs/storybook/blob/next/addons/docs/docs/props-tables.md#imported-types
This is supported byreact-docgen-typescript and we'll be making it easier to switch between the two as a consequence of this shortcoming in react-docgen.
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!
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!
A few weeks ago we released zero-config typescript support in 6.0-beta, and then a few days ago upgraded react-docgen-typescript-loader to react-docgen-typescript-plugin in the latest beta. This will solve many typescript props-related issues, possibly including this one:
Please try it out!
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!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
Most helpful comment
A few weeks ago we released zero-config typescript support in 6.0-beta, and then a few days ago upgraded
react-docgen-typescript-loadertoreact-docgen-typescript-pluginin the latest beta. This will solve many typescript props-related issues, possibly including this one:Please try it out!