Describe the bug
When using addon:docs prop table for React tsx components the boolean default values don't show up in the table.
To Reproduce
import React, { FC } from "react";
interface ButtonProps {
/**
* Simple click handler
*/
onClick?: () => void;
/**
* Is primary?
*/
primary: boolean;
}
/**
* The world's most _basic_ button
*/
export const Button: FC<ButtonProps> = ({ children, onClick }) => (
<button onClick={onClick} type="button">
{children}
</button>
);
Button.defaultProps = {
primary: true
};
yarn storybook and see the result.
Expected behavior
Default values showing up.
System:
System:
OS: Linux 5.0 Ubuntu 18.04.3 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Binaries:
Node: 10.18.0 - /usr/bin/node
Yarn: 1.21.1 - /usr/bin/yarn
npm: 6.13.4 - /usr/bin/npm
Browsers:
Chrome: 79.0.3945.88
Firefox: 71.0
npmPackages:
@storybook/cli: ^5.3.0 => 5.3.0
@shilman I've looked over this and it appears to be an issue with Docs itself.
The default here is 'false' or 'true'. When testing, all default values come through unless Boolean. My guess is that we need to stringify the values, at least when boolean.
@papeloto are you interested in having a go at this? If not, let me know and I can take a look and make the fix :)
same here, boolean defaultProps disappear after upgrade to 5.3.x
Yee-haw!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.7 containing PR #9525 that references this issue. Upgrade today to try it out!
Closing this issue. Please re-open if you think there's still more to do.
Just upgraded to v5.3.7

Now false values don't show up 馃槀
Button.defaultProps = {
variant: "primary",
disabled: false,
type: "button",
inline: false,
accessibilityLabel: "Button",
uppercase: true,
expand: false
};
Ooh-la-la!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.0 containing PR #9560 that references this issue. Upgrade today to try it out!
You can find this prerelease on the @next NPM tag.
Closing this issue. Please re-open if you think there's still more to do.
Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.8 containing PR #9560 that references this issue. Upgrade today to try it out!
Most helpful comment
Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.8 containing PR #9560 that references this issue. Upgrade today to try it out!