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