Closed petermikitsh closed 4 years ago
Yeah this could probably be improved. I factored out all the renders but haven't integrated them
repo: https://github.com/hipstersmoothie/storybook-pretty-props
We could probably make it look like the shape renderer and have it expand.
It would look nice if it was formatted like a long type with prettier:
oneOf
| 'one'
| 'two'
| 'three'
Then the collapsed state (show like 23-36 characters)
oneOf = 'one' | 'two' | ...
If you make a PR to storybook-pretty-props i'll integrate it here 🚀
@hipstersmoothie How can the lines be maximized programmatically? Looks like clicking the ellipsis button is the only way to toggle this and it is always set to minimized by default (e.g. for the oneOf
type)?
I have some components who's prop types are a lot of text. For example, my Icon component is one of roughly 1,000 strings (enum). So it's a lot of scrolling to get to the next prop, when the propTypes data is 16,000px tall:
Thoughts on having a max-height for types, with overflow scroll?