This repo is a clone of example CRA + TS + Mui + styled-components repo by Mui with a few changes on top - pretty much just added Storybook, ts docgen and a reproduction scenario.
Description of suspicious behaviour: In order for Controls to auto-generate properly for a component, the name of a variable to which the component is assigned must match the name of the file in which it is defined.
Two components of interest - Tooltip.tsx
and Tooltip2.tsx
- are in this repo. Both files have exactly the same content, but only Tooltip.tsx
gets props auto-generated. This is because the name of exported variable matches the name of the file.