algodynamics-iiith/core/1.0.0

Core.Prompt

This module gives the default styled prompts for feedback.

Definitions

type alias Prompt =
( String, PromptType )

A prompt is a message string with prompt type

-- A basic example of prompt
Prompt ("You have successfully added the prompt module", PromptSuccess)
= PromptSuccess
| PromptDanger
| PromptInfo

A prompt can be of one of the following types

  1. Success Prompt : green in color
  2. Danger Prompt : red in color
  3. Information Prompt : blue in color

View

show : Prompt -> Html msg

Show function shows the prompt on the UI using default styles. -- add the following line to your view function's child elements to see a basic prompt show <| Prompt ("You have successfully added the prompt module", PromptSuccess)