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
add arg table for ReferenceArea stories #3486
add arg table for ReferenceArea stories #3486
Conversation
Hi @lukask-proxora! Please rebase to |
+1 to the above, thanks |
@@ -9,24 +9,37 @@ export const animationBegin = { | |||
description: 'Specifies when the animation should begin, the unit of this option is ms.', | |||
type: { name: 'number' }, | |||
defaultValue: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the defaultValue seems to be defined twice. Is that necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nikolasrieble, without the defaultValue
in the table
prop, the default value in the args table is not set to the manually set defaultValue
of the argType, but only to the inferred default value.
According to storybookjs/storybook#11983 (comment) (which also refers to https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#no-longer-inferring-default-values-of-args):
To affect the Default column in the ArgsTable, you should set the argTypes..table.defaultValue field. The value should be an object with the keys summary and optionally details, which are both strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, please remove the redundant duplicate definition of the defaultValue in the AnimationProps. Not blocking though.
merging in for now, thanks! |
Description
Related Issue
#3432
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: