#canvas sourceState vs withSource

6 messages · Page 1 of 1 (latest)

dapper plume
#

I am not sure what I am doing wrong here but I cant seem to get the sourceState attribute to behave the way withSource attribute behaves. I think I am following the documentation here (https://storybook.js.org/docs/react/api/doc-block-canvas#sourcestate) but the results seem different that what is described.

Using: SB 7.0.9 and Angular

Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and documentation. It’s open source and free.

nova garnet
#

hey George!

<@&1106564433309872189> - any ideas?

fierce charm
#

Try <Canvas of={...} sourceState="none" />

dapper plume
#

Thanks @fierce charm ... what goes in the value for Of ? I dont have an actual story to display here I am just wanting the canvas for setting the other state based parameters.

fierce charm
dapper plume
#

rats. I interpreted that not as "no inline building of content" but rather "no inline setting up of the story object"