Fable allows you to create a book (like a repository) of your html views, they are grouped as chapters, stories.
app : List (Data.Chapter.Chapter msg) -> Book msg
Launch a fable application with a list of chapters
main : Book Msg
main =
Fable.app []
Platform.Program () (Model msg) (Data.Msg.Msg msg)
Book application type
main : Book Msg
main =
let
chapters =
[ Fable.chapter "chapter1" [] ]
in
Fable.app chapters
chapter : String -> List (Data.Story.Story msg) -> Data.Chapter.Chapter msg
Chapter represents a category like Forms, Blocks, or whatever. It needs an unique id.
chapters = [
Fable.chapter "chapter 1" []
]
story : String -> List (Data.Ui.Ui msg) -> Data.Story.Story msg
Story represents a list of element html (like input with different state). It needs an unique id.
stories = [
Fable.story "story 1" []
]
ui : String -> Html.Styled.Html msg -> Data.Ui.Ui msg
Ui represents an element of your view. It needs an unique id.
ui = [
Fable.ui "ui 1" (div [] [])
]