Skip to content

Instantly share code, notes, and snippets.

@gmp26
Created October 13, 2014 14:23
Show Gist options
  • Save gmp26/5d0233bd70f76373ad51 to your computer and use it in GitHub Desktop.
Save gmp26/5d0233bd70f76373ad51 to your computer and use it in GitHub Desktop.
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