storybook-addon-html icon indicating copy to clipboard operation
storybook-addon-html copied to clipboard

feat: added raw HTML param to display pre-rendered source

Open oliverseddonhome opened this issue 3 years ago • 3 comments

oliverseddonhome avatar Dec 15 '21 14:12 oliverseddonhome

Which frameworks have you tested this with?

jeanfredrik avatar Jan 24 '22 08:01 jeanfredrik

sorry to dig this up! currently facing an issue because of this ; i'm using lit. here's my original HTML:

const Template: Story<PpnImagesRowT & { images: string[] }> = ({
    images,
    rowHeight,
    objectFit,
}): TemplateResult => {
    return html`
        <ppn-images-row .rowHeight="${rowHeight}" .objectFit="${objectFit}">
            ${images.map(
                (imgUrl, index) =>
                    html` <img src="${imgUrl}" alt="catto ${index}" /> `
            )}
        </ppn-images-row>
    `;
};

sadly, my two properties (which manipulate style) get rendered this way in storybook, as computed inline style: image

not too sure how what's the best solution for this 🥲

ceIia avatar Jun 11 '23 15:06 ceIia

It doesn't seem like this particular fix would resolve the issue. But I can confirm that this is really an issue - changing between stories would end up showing my hydration CSS classes (Web Component / Custom Element created with Stencil). Also shows all calculated stuff, same logic as in @ceIia case. Also using lit in Storybook to showcase our components.

tanel-terras avatar Nov 06 '23 15:11 tanel-terras