Bernardoow / elm-alert-timer-message / AlertTimerMessage

Simple message alert library. Its functionality is to hide and show alerts. The module is given a time and an HTML structure then does the job. You can create css and pass the msg to display.

The model


type alias Model =
{ messages : Dict Basics.Int Message
, count : Basics.Int 
}

The model is simple. It's have a dict with msg and counter of displayed msg.

The initial state

modelInit : Model

Empty model with counter 1

View

view : Model -> Html Msg

Msg


type Msg
    = AddNewMessage Basics.Float (Html Msg)
    | RemoveAlert Basics.Int

The type representing messages that are passed inside the Rating. Notice: AddNewMessage receive two params: Float will be time to display and Html Msg will be a html struture. Tip: Use Css to improve Html Msg.

Update

update : Msg -> Model -> ( Model, Platform.Cmd.Cmd Msg )