dtwrks/elm-book-interop-elm-css

Use elm-book and elm-css together


License
MPL-2.0
Install
elm-package install dtwrks/elm-book-interop-elm-css 1.0.0

Documentation

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 Html.Styled exposing (div, text)
import ElmBook exposing (withChapters)
import ElmBook.ElmCSS exposing (Book, book, Chapter)
import ElmBook.Chapter exposing (chapter, renderComponent)


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


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