Created
August 26, 2014 14:22
-
-
Save bzar/885fbbed6258da10fe0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html | |
import Html (..) | |
import Window | |
main = lift scene Window.dimensions | |
scene (w,h) = Html.toElement w h content | |
content = node "div" [] [] | |
[ text "Hellollo World" | |
, myButton (px 128) (px 64) "Button!" | |
] | |
myButton : String -> String -> String -> Html | |
myButton w h caption = | |
node "div" [] | |
[ "display" := "inline-block" | |
, "width" := w | |
, "textAlign" := "center" | |
, "backgroundColor" := "#333" | |
, "color" := "#eee" | |
, "height" := h | |
, "lineHeight" := h | |
] | |
[ text caption ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment