Use this module to integrate other rendering engines to ElmBook such as Elm-UI and Elm-CSS. Lets see how we would integrate Elm-UI and ElmBook:
module ElmBook.ElmUI exposing (Book, Chapter, book)
import Element exposing (Element, layout)
import ElmBook.Custom exposing (customBook)
type alias Html state =
Element (ElmBook.Custom.Msg state)
type alias BookBuilder state =
ElmBook.Custom.BookBuilder state (Html state)
type alias Book state =
ElmBook.Custom.Book state (Html state)
type alias Chapter state =
ElmBook.Custom.Chapter state (Html state)
book : String -> BookBuilder state
book =
customBook (layout [])After that you would only need to use this custom book function and Book type when creating a new book and the custom Chapter definition when creating a new chapter.