Created
October 13, 2014 14:23
-
-
Save gmp26/5d0233bd70f76373ad51 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 String | |
import Graphics.Input (Input, input) | |
import Graphics.Input.Field as Field | |
content : Input Field.Content | |
content = input Field.noContent | |
main : Signal Element | |
main = | |
lift scene content.signal | |
ds = Field.defaultStyle | |
fieldStyle = { ds | outline <- | |
{ color = red | |
, width = { left = 50, | |
right = 50, | |
top = 50, | |
bottom = 50 | |
} | |
, radius = 100 | |
} | |
} | |
scene : Field.Content -> Element | |
scene fieldContent = | |
flow down | |
[ Field.field fieldStyle content.handle identity "Type here!" fieldContent | |
, plainText (String.reverse fieldContent.string) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment