Created
January 21, 2022 04:48
-
-
Save crawftv/3d8972f2cddea44118292165ffd0092e 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
view : Model -> Html Msg | |
view model = | |
case model.selectedGender of | |
Just x -> | |
case x of | |
Masculine -> | |
div [] [ | |
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)] | |
] | |
Feminine -> | |
div [] [ | |
div [] | |
[ button [onClick (SelectGender Masculine)] [text "Masculine"] | |
, button [onClick (SelectGender Feminine), style "background-color" "blue"] [text "Feminine"] | |
, button [onClick (SelectGender Neuter)] [text "Neuter"] | |
] | |
, div [] [text (Debug.toString model)] | |
] | |
Neuter -> | |
div [] [ | |
div [] | |
[ button [onClick (SelectGender Masculine)] [text "Masculine"] | |
, button [onClick (SelectGender Feminine)] [text "Feminine"] | |
, button [onClick (SelectGender Neuter), style "background-color" "blue" ] [text "Neuter"] | |
] | |
, div [] [text (Debug.toString model)] | |
] | |
Nothing -> | |
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