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 : ProgressIndicatorStyle msg
progressIndicatorStyle = progressIndicatorStyle =
{ icon = { containerFunction =
\maybeProgress -> \maybeProgress ->
case maybeProgress of case maybeProgress of
Nothing -> Nothing ->

View File

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

View File

@ -136,5 +136,5 @@ type alias LayoutStyle msg =
{-| -} {-| -}
type alias ProgressIndicatorStyle 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 -> ProgressIndicatorStyle msg
progressIndicator palette = progressIndicator palette =
{ icon = { containerFunction =
\maybeProgress -> \maybeProgress ->
case maybeProgress of case maybeProgress of
Nothing -> Nothing ->

View File

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