Skip to content

Instantly share code, notes, and snippets.

@crawftv
Created January 21, 2022 04:46
Show Gist options
  • Save crawftv/c1078c15607425217352d3c40fdc6fe0 to your computer and use it in GitHub Desktop.
Save crawftv/c1078c15607425217352d3c40fdc6fe0 to your computer and use it in GitHub Desktop.
view : Model -> Html Msg
view model =
case model.selectedGender of
Just Masculine ->
div []
[ button [onClick (SelectGender Masculine), style "background-color" "blue"] [text "Masculine"]
, button [onClick (SelectGender Feminine)] [text "Feminine"]
, button [onClick (SelectGender Neuter)] [text "Neuter"]
,div [] [text (Debug.toString model)]
]
_ ->
div []
[ button [onClick (SelectGender Masculine)] [text "Masculine"]
, button [onClick (SelectGender Feminine)] [text "Feminine"]
, button [onClick (SelectGender Neuter)] [text "Neuter"]
,div [] [text (Debug.toString model)]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment