Created
April 14, 2016 12:56
-
-
Save chalmagean/5f77692037eaef9dc41590bd9fc25701 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
type Action | |
= NoOp | |
| UpdateProtein String | |
view : Signal.Address Action -> Model -> Html | |
view address model = | |
div [] [ | |
div [] [ | |
input | |
[ type' "text" | |
, placeholder "Protein" | |
, myInput address UpdateProtein | |
] [] | |
] | |
] | |
myInput : Signal.Address a -> Action -> Attribute | |
myInput address action = | |
on "input" targetValue (\value -> Signal.message address (action value)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment