-
Fixed: Fix incorrect component name capitalization (#1388)
Fixes #1381
It is happening in a case when react-docgen (any propsParser) is failed and we are trying to guess displayName based on file path. We capitalized every case in the string instead of just words separated by
-
started with small letter. So, by mistakeButtonTS
in file name becomesButtonTs
display name for component when we expectButtonTS
Use [startCase]:(https://lodash.com/docs/4.17.11#startCase) and then remove spaces which covers most our cases likemy-buttonTS => MyButtonTS