DEV Community

Discussion on: Working with menus in elm-ui

Collapse
 
rolograaf profile image
Lourens • Edited

Girish Sonawane is using a CSS framework called BULMA to make a Modal pop-up in elm, as descibed in article medium.com/@girishso/displaying-mo.... I think by using a fullscreen container div as background it is toggling the modal state onClick. If that is any useful...

bulma.io/documentation/components/...

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" ]
                    []
                ]
...