-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
addon-docs + typescript does not pick up default props #11026
Comments
I've been having trouble with this setup, too. You might get some mileage out of the following changes which I keep having to make to my components: export interface Props {
+ /** annotation */
label?: string;
+ /** annotation */
bgColor: string;
+ /** annotation */
textColor: string;
}
- export const Button: React.FC<Props> = ({
+ export const Button = ({
label = 'Submit',
bgColor,
textColor,
...rest
- }) => {
+ }: Props) => { |
cc @hipstersmoothie is there anything we can do about this on the |
I think this might have been fixed already. react-docgen-typescript supports this and has tests to show it. I think this should have been fixed with #11184 which went out in beta 31 |
You rock @hipstersmoothie. @youfoundron can you try upgrading? |
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 think he wants you to try the newest storybook beta/alpha |
|
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! |
Describe the bug
Default props are not picked up by the
@storybook/addon-docs
addon when using typescript.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expect Default column to be populated based on React functional component definition per page 7 of the args RFC
Screenshots
Code snippets
System:
The text was updated successfully, but these errors were encountered: