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.
Now the defaultValue seems to be defined twice. Is that necessary?
There was a problem hiding this comment.
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.
nikolasrieble
left a comment
There was a problem hiding this comment.
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: