Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 656 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 656 Bytes

Use the book function and Book type when creating a new book and the custom Chapter type when creating a new chapter. Everything else should work the same as expected.

module MyBook exposing (main)


import Element exposing (el, text)
import ElmBook exposing (withChapters)
import ElmBook.ElmUI exposing (Book, book, Chapter)
import ElmBook.Chapter exposing (chapter, renderComponent)


firstChapter : Chapter x
firstChapter =
    chapter "First Chapter"
        |> renderComponent
            (el [] <| text "Hello")


main : Book ()
main =
    book "ElmBook with Elm-UI"
        |> withChapters
            [ firstChapter
            ]