bluedogtraining/bdt-elm/15.1.1

NOTE: this package is not compatible with Elm 0.19.1

Html.Styled.Bdt

Helpers on top of Html.Styled to show/hide things

Show Hide Elements

(?) : Attribute msg -> Bool -> Attribute msg

Optionally add an attribute.

button
    [ onClick MyMessage ? model.isButtonEnabled ]
    [ text "Clickety Click" ]
maybeAttribute : (a -> Attribute msg) -> Maybe a -> Attribute msg

Maybe add an attribute.

button
    [ maybeAttribute onClick model.myMaybeMsg ]
    [ text "Clickety Click" ]
viewIf : Bool -> Html msg -> Html msg

Only display if True.

viewIf model.isShown myViewFunction
divIf : Bool -> List (Attribute msg) -> List (Html msg) -> Html msg

Only display if True.

divIf model.isShown
    [ id "potato" ]
    [ text "Hello" ]
maybeView : Maybe a -> (a -> Html msg) -> Html msg

Maybe display a view.

maybeView view model.myMaybe