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

Prop table does not render when a Type is used #9465

Closed
sami616 opened this issue Jan 15, 2020 · 5 comments
Closed

Prop table does not render when a Type is used #9465

sami616 opened this issue Jan 15, 2020 · 5 comments

Comments

@sami616
Copy link

sami616 commented Jan 15, 2020

Interface's work as expected, however when declaring prop as a Type storybook isn't able to render a prop table.

ie:

👍🏼

interface Props extends React.ButtonHTMLAttributes<HTMLButtonElement> {
  disabled?: boolean
}

const Component = ( { disabled = false, children }: Props) => <button disabled={disabled}>{children}</button>

👎🏼

type Props = React.ButtonHTMLAttributes<HTMLButtonElement> &  {
  disabled?: boolean
}

const Component = ( { disabled = false, children }: Props) => <button disabled={disabled}>{children}</button>
@sami616 sami616 changed the title Prop table does render when a Type is used Prop table does not render when a Type is used Jan 16, 2020
@stale
Copy link

stale bot commented Feb 6, 2020

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!

@stale stale bot added the inactive label Feb 6, 2020
shilman added a commit that referenced this issue Feb 14, 2020
@shilman
Copy link
Member

shilman commented Feb 14, 2020

Repro: dd10817

This appears to be working in react-docgen

@stale stale bot removed the inactive label Feb 14, 2020
@stale stale bot added the inactive label Mar 6, 2020
@shilman
Copy link
Member

shilman commented Mar 7, 2020

@sami616 can you try the recommended 6.0 setup (should work in 5.3 too) and based on the repro linked above I expect the problem to be fixed:

https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-prop-tables-with-typescript

@stale stale bot removed the inactive label Mar 7, 2020
@storybookjs storybookjs deleted a comment from stale bot Mar 7, 2020
@stale
Copy link

stale bot commented Mar 28, 2020

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!

@stale stale bot added the inactive label Mar 28, 2020
@stale
Copy link

stale bot commented Apr 28, 2020

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!

@stale stale bot closed this as completed Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants