Package

purescript-halogen-storybook

Repository
rnons/purescript-halogen-storybook
License
BSD-3-Clause
Uploaded by
rnons
Published on
2018-03-24
purescript-halogen-storybook on Pursuit

A library to assemble examples or develop components separately.

DEMO

How to use

First define the stories. Each story consists of a name and a component.

import Halogen.Storybook (Stories, runStorybook, proxy)

stories :: forall m. Stories m
stories = SM.fromFoldable
  [ Tuple "count" $ proxy $ ExpCount.component
  , Tuple "input" $ proxy $ ExpInput.component
  ]

Then add a runStorybook line to your main function. That's it.

main = HA.runHalogenAff do
  body <- HA.awaitBody
  runStorybook stories body