From 089956c3b2d1ba76c77c490b437d532fef4b8aa4 Mon Sep 17 00:00:00 2001 From: SimonLab Date: Thu, 2 Apr 2020 16:44:07 +0100 Subject: [PATCH] add section for elm and elm-ui compatibiliy --- tutorials/elm-ui/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tutorials/elm-ui/README.md b/tutorials/elm-ui/README.md index 12a9cb0..9bddeaa 100644 --- a/tutorials/elm-ui/README.md +++ b/tutorials/elm-ui/README.md @@ -573,6 +573,25 @@ This allows us to pinpoint the _single_ `el` in the `row` if we need to.

+### Using html from Elm + +If for any reasons you can't find a situable `elm-ui` functions +for your use cases, the `Element` module provide the [html](https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/Element#html) +and [htmlAttribute](https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/Element#htmlAttribute). + +You can for example create your normal element using the [Html](https://package.elm-lang.org/packages/elm/html/latest/) package +and convert it to elm-ui `Element` + +```elm +myDiv : Html msg +myDiv = + div [] [text "elm div"] + +myElementDiv : Element msg +myElementDiv = + html myDiv +``` + # Want _More_? If you enjoyed learning the basics of `elm-ui`