Refactor ProgressIndicatorStyle record from icon to containerFunction

This commit is contained in:
chris 2020-08-12 10:49:59 -07:00
parent b1d75d259b
commit d0178f37f6
5 changed files with 5 additions and 5 deletions

View File

@ -286,7 +286,7 @@ sortTable =
progressIndicatorStyle : ProgressIndicatorStyle msg
progressIndicatorStyle =
{ icon =
{ containerFunction =
\maybeProgress ->
case maybeProgress of
Nothing ->

View File

@ -9,4 +9,4 @@ circularProgressIndicator :
-> Maybe Float
-> Element msg
circularProgressIndicator style maybeProgress =
style.icon maybeProgress
style.containerFunction maybeProgress

View File

@ -136,5 +136,5 @@ type alias LayoutStyle msg =
{-| -}
type alias ProgressIndicatorStyle msg =
{ icon : Maybe Float -> Element msg
{ containerFunction : Maybe Float -> Element msg
}

View File

@ -1313,7 +1313,7 @@ determinateCircularIcon color attribs progress =
progressIndicator : Palette -> ProgressIndicatorStyle msg
progressIndicator palette =
{ icon =
{ containerFunction =
\maybeProgress ->
case maybeProgress of
Nothing ->

View File

@ -352,7 +352,7 @@ progressIndicator string =
-}
progressIndicator : String -> ProgressIndicatorStyle msg
progressIndicator string =
{ icon = (\_ -> icon <| string ++ ":icon")
{ containerFunction = (\_ -> icon <| string ++ ":icon")
}