It seems that the docgen info is being created based on the filename, not the name of the component in the file. In this case, the component is something like:
Note that __docgenInfo is being added to BaseButton, which doesn't exist, but is the name of the file.
I tried removing the React.forwardRef, but that had no effect. Only when I changed the name of the const to BaseButton did the argsTable get generated correctly.
This was originally reported in https://github.com/storybookjs/builder-vite/issues/79#issuecomment-1105487705.
It seems that the docgen info is being created based on the filename, not the name of the component in the file. In this case, the component is something like:
But, the docgen info is added like this:
Note that
__docgenInfo
is being added toBaseButton
, which doesn't exist, but is the name of the file.I tried removing the
React.forwardRef
, but that had no effect. Only when I changed the name of the const toBaseButton
did the argsTable get generated correctly.