Closed twiddler closed 1 year ago
This is not something that exists in Storybook either, right?
Is the ask to add Flatten
to Ladle so you can import it from there or some other changes as well?
I don't know. 🤷
I'm very much open to change my workflow if someone has some advice on how they deal with such situations.
Not really sure what to do here and there is a user land solution anyway.
Is your feature request related to a problem? Please describe. I am using ladle with TypeScript. Some of my components expect objects to be passed in. AFAIK, ladle controls are flat, i.e. to control object args I must
However, I lose type-safety this way.
Describe the solution you'd like
Describe alternatives you've considered To not lose type-safety, I flatten the parameters of the component I want to control. In the story, I deflatten the individual parameters into objects again.
We might want to include a helper like
Flatten
in ladle itself.