Last active
December 28, 2017 02:20
-
-
Save girishso/c070f95706ccfd3127775797f038ea54 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 = | |
section [ class "section" ] | |
[ div [ class "container" ] | |
[ h1 [ class "title" ] | |
[ text model.projectName ] | |
, p [ class "subtitle" ] | |
[ button [ class "button", onClick TogglePopup ] | |
[ text "Show Popup" | |
] | |
] | |
, if model.isPopUpActive then | |
renderModal model | |
else | |
Html.text "" | |
] | |
] | |
renderModal : Model -> Html Msg | |
renderModal model = | |
div [ class "modal is-active", attribute "aria-label" "Modal title" ] | |
[ div [ class "modal-background", onClick TogglePopup ] | |
[] | |
, div [ class "modal-card" ] | |
[ header [ class "modal-card-head" ] | |
[ p [ class "modal-card-title" ] | |
[ text "Modal title" ] | |
, button [ class "delete", onClick TogglePopup, attribute "aria-label" "close" ] | |
[] | |
] | |
, section [ class "modal-card-body" ] | |
[ text "Modal contents" ] | |
, footer [ class "modal-card-foot" ] | |
[ button [ class "button", onClick TogglePopup, attribute "aria-label" "cancel" ] | |
[ text "Cancel" ] | |
] | |
] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment