Storybook: addon-info: propTypes with references

Created on 4 Oct 2018  路  8Comments  路  Source: storybookjs/storybook

Passing references into prop types such as oneOf results in incorrect info being created.

Example:

const fooTypes = ['bar', 'foo', 'foobar'];

Component.propTypes = {
  foo: PropTypes.oneOf(fooTypes)
}

Generates:

property | propType       | required | default   | description
foo      | oneOf fooTypes | -        | undefined |

Rather than the expected:

property | propType                     | required | default   | description
foo      | oneOf 'bar', 'foo', 'foobar' | -        | undefined |
info inactive

Most helpful comment

I'm suffering the exact same issue. My current Storybook version is 4.0.2.

All 8 comments

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!

I'm suffering the exact same issue. My current Storybook version is 4.0.2.

Same here! My current Storybook version is also 4.0.2.

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!

Same here with 4.0.12

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!

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shilman picture shilman  路  3Comments

tlrobinson picture tlrobinson  路  3Comments

tomitrescak picture tomitrescak  路  3Comments

wahengchang picture wahengchang  路  3Comments

rpersaud picture rpersaud  路  3Comments