hash icon indicating copy to clipboard operation
hash copied to clipboard

H-1: Support loading blocks in Storybook

Open vilkinsons opened this issue 2 years ago • 0 comments

Context

We'd like to be able to load the contents of our blocks directory into the HASH Storybook instance (not to be confused with that recently set up in the Block Protocol repository):

There are a number of different ways we could probably go about making blocks accessible within Storybook, including through the use of the Þ Dock (aka. mock-block-dock, or "MBD") as a decorator, wrapped into a Block Protocol add-on for Storybook.

How a Þ Storybook add-on might work

Functionality

Flesh this out

We would create an add-on for Storybook.

We would use the Þ Dock as a decorator: https://storybook.js.org/docs/react/writing-stories/decorators

Location in monorepo

The code for the add-on would likely live within the blockprotocol repository's libs folder.

Publishing the add-on

Once functional, the Storybook add-on could be published to npm and the add-on itself even listed in the public Storybook integrations library. The add-on could then be imported for use within both the # and Þ Storybook instances.

Follow-ups

Unblocks H-3 and H-5.

vilkinsons avatar Mar 24 '23 18:03 vilkinsons