How do we use booleans in Storybook with Lit? #65
-
If we have a boolean attribute / property in our Lit web component? How do we set a boolean in Storybook so that it updates as expected?
Possible solution
I think this works because Some backgroundLit-html is used to generate the Lit component in stories. The html`` syntax does this. If an attribute exists, even if the value is Attempted solutions
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
:( & :) I swear we tried I think this is the solution for booleans. |
Beta Was this translation helpful? Give feedback.
:( & :)
I swear we tried
?shouldShowIcon="${shouldShowIcon}"
several times and it wasn't doing what we expected in Storybook, but now it seems to work as expected.I think this is the solution for booleans.