Replies: 2 comments
-
The way your template is set up you are binding to the properties and not to the attributes, so what is rendered is just the tag. Does updating your template to something like this change anything? const Template = (args: DateFormatterProps) => {
return html`
<date-formatter
.date=${args.date}
?show-hours-and-minutes=${args.showHoursAndMinutes}
?show-date-only=${args.showDateOnly}
?digit-only-format=${args.digitOnlyFormat}
?show-seconds=${args.showSeconds}
></date-formatter>
`;
} |
Beta Was this translation helpful? Give feedback.
-
I came here to ask the same thing. I presume that React storybooks show the JSX, not just the resulting HTML? So it'd be great to be able to show the lit-html template to see how properties are set. For web components in general, it'd be even better to be able to switch the code view between various template syntaxes, since they work with all of them. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this is possible, a bug, or I'm doing something wrong. I'm using Storybook 7.0.11 and Lit 2.61; when I click on the "Show Code" option in a story it only shows the tag for my Lit component and none of the properties that were set, which makes the Show Code option kind of pointless. Is there a way to make it work?
Beta Was this translation helpful? Give feedback.
All reactions