-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
This is a question regarding the behavior of undefined story parameters and how they're supposed to work, because I only found this out from looking at old PRs. Seems this is not in the docs (or I was too blind to see it?).
Whenever you have undefined as a possible value for a parameter, it will always be cast into a string. So if you want to do any conditional rendering, you can't check for truth/boolean value, but you need to explicitly compare it as a string.
From what I understand, this is expected/wanted functionality, right?
I've created an example here: https://stackblitz.com/edit/ladle-m2rhbuxm?file=src%2Fcontrols.stories.tsx
Please look at the controls.stories.tsx file.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels