for more information visit the package's GitHub page
Package contains the following modules:
Bulletproof is a tool which helps you to organize UI components isolated of each other. Inspired by Storybook project.
elm install owanturist/elm-bulletproof
module HelloWorld exposing (story)
import Html exposing (div, h1, p, text)
import Bulletproof
import Bulletproof.Knob
story : Bulletproof.Story
story =
Bulletproof.story "Hello World"
(\storyTitle storyText ->
div []
[ h1 [] [ text storyTitle ]
, p [] [ text storyText ]
]
)
|> Bulletproof.Knob.string "Story title" "Hello World"
|> Bulletproof.Knob.radio "Story text"
[ ( "Never ending story", "I once brought a honeycomb and a jackass into a brothel..." )
, ( "Long story", "A long time ago in a galaxy far, far away..." )
]
To setup Bulletproofs' app please take a look into demo
folder.
There you might find files with exapmles of code required to run it.
I'm sorry you have to copy-paste the configuration.
It's under progress to get started by single command.
There is no way to include a component messages to Elm loop. It meas that all components are static. There is only one way to dynamically interact with them by knobs. The reason is to simplify interface of story creation. Otherwise a developer must to develop wide system of custom messages and models to make The Elm Architecture works.