项目作者: dtwrks

项目描述 :
Use elm-ui with elm-book
高级语言: Elm
项目地址: git://github.com/dtwrks/elm-book-interop-elm-ui.git
创建时间: 2021-07-18T10:23:55Z
项目社区:https://github.com/dtwrks/elm-book-interop-elm-ui

开源协议:Mozilla Public License 2.0

下载


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.

  1. module MyBook exposing (main)
  2. import Element exposing (el, text)
  3. import ElmBook exposing (withChapters)
  4. import ElmBook.ElmUI exposing (Book, book, Chapter)
  5. import ElmBook.Chapter exposing (chapter, renderComponent)
  6. firstChapter : Chapter x
  7. firstChapter =
  8. chapter "First Chapter"
  9. |> renderComponent
  10. (el [] <| text "Hello")
  11. main : Book ()
  12. main =
  13. book "ElmBook with Elm-UI"
  14. |> withChapters
  15. [ firstChapter
  16. ]