-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Storybook 5.2 static app docs either has missing props section or props descriptions #8140
Comments
Sorry for the slow reply here. Can you post your config/presets files? Also, are you using CRA? |
Here you go.
And yes CRA is being used. Thanks! |
@glenp01 can you try this? https://www.npmjs.com/package/@storybook/preset-create-react-app cc @mrmckeb |
I am having this same issue, both with CRA and without CRA. Without CRA i installed react-scripts and was able to get the Would you, @shilman , suggest trying that preset-create-react-app as well? Unfortunatley I am using a |
There are a collection of issues piling up with different versions of what's probably the same underlying problem. I'm going to try to spend some time on it this week. |
Much appreciated!!! |
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! |
Scratch that, it was a coincidence that some did render completely. Below is an example of a component for which the props table renders properly. I'm not sure yet why this would be. // A dummy component for generating documentation for column properties
export const Column = () => <></>;
Column.propTypes = {
/* eslint-disable react/no-unused-prop-types */
/** The header label of the column */
header: string.isRequired,
/** The name of the property or an accessor method if selecting deeper data */
accessor: oneOfType([
string.isRequired,
func.isRequired,
]).isRequired,
/** Display the cell content in bold type */
bold: bool,
/** Text alignment of the header label and cell content */
align: oneOf(['left', 'center', 'right']),
/** Include this column into sorting option, alphabetically or numerically */
sortable: oneOf(['alpha', 'numeric']),
};
Column.defaultProps = {
bold: false,
align: 'left',
sortable: null,
}; Sidenote: My reason for doing this is to document the shape of an array prop more elaborately. |
Having the same issue. For me, the props table in the static app does not show props that are required, or props that have an undefined default. |
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! |
Repro here: 964d40d |
I was running into the same issue. Setting "scripts": {
"build-storybook": "NODE_ENV=development build-storybook"
} Not sure what else this might do under the hood, but I'm now seeing props in the static build of Storybook just like when running locally. |
Setting The issue was caused by including the |
Having the same issue. For testing I created a completely new react app using CRA5, then installed SB, (including the webpack5 fix/workaround that |
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:
|
Describe the bug
After updating to Storybook 5.2, the props section is rendering fine when running via storybook locally but after generating a static app with the storybook build, the props section either does not show up or the descriptions are missing.
To Reproduce
Steps to reproduce the behavior:
yarn build-storybook
and viewing the static app, the props section has the above issuesExpected behavior
The props section should be the same as it is when running storybook
Screenshots
Locally
Static app
Code snippets
System:
Additional context
None
The text was updated successfully, but these errors were encountered: