bluedogtraining/bdt-elm/21.1.0

NOTE: the latest version is 27.0.14

Html.Styled.Bdt

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

Show/Hide Elements

attributeIf : Bool -> Attribute msg -> Attribute msg

Optionally add an attribute.

button
    [ onClick MyMessage |> attributeIf 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