Update part2
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
module Loading exposing (error, icon)
|
||||
module Loading exposing (error, icon, slowThreshold)
|
||||
|
||||
{-| A loading spinner icon.
|
||||
-}
|
||||
|
||||
import Html exposing (Attribute, Html, div, li)
|
||||
import Html.Attributes exposing (class, style)
|
||||
import Asset
|
||||
import Html exposing (Attribute, Html)
|
||||
import Html.Attributes exposing (alt, height, src, width)
|
||||
import Process
|
||||
import Task exposing (Task)
|
||||
|
||||
|
||||
icon : Html msg
|
||||
icon =
|
||||
li [ class "sk-three-bounce", style "float" "left", style "margin" "8px" ]
|
||||
[ div [ class "sk-child sk-bounce1" ] []
|
||||
, div [ class "sk-child sk-bounce2" ] []
|
||||
, div [ class "sk-child sk-bounce3" ] []
|
||||
]
|
||||
Html.img [ Asset.src Asset.loading, width 64, height 64, alt "Loading..." ] []
|
||||
|
||||
|
||||
error : String -> Html msg
|
||||
error str =
|
||||
Html.text ("Error loading " ++ str ++ ".")
|
||||
|
||||
|
||||
slowThreshold : Task x ()
|
||||
slowThreshold =
|
||||
Process.sleep 500
|
||||
|
||||
Reference in New Issue
Block a user