Applying Elm-Analyse

This commit is contained in:
Lucas Payr 2020-08-13 19:16:57 +02:00
parent 1dfb6057db
commit bd96c7cf3f
6 changed files with 13 additions and 13 deletions

File diff suppressed because one or more lines are too long

View File

@ -520,7 +520,7 @@ progressIndicator _ style =
[ 0, 0.25, 0.50, 0.75, 1 ] [ 0, 0.25, 0.50, 0.75, 1 ]
|> List.map |> List.map
(\completeness -> (\completeness ->
( "Determinate Progress Indicator, completeness " ++ String.fromFloat completeness ( "Completeness " ++ String.fromFloat completeness
, Widget.circularProgressIndicator style.progressIndicator (Just completeness) , Widget.circularProgressIndicator style.progressIndicator (Just completeness)
) )
) )

View File

@ -9,7 +9,7 @@ module Widget exposing
, TextInput, textInput , TextInput, textInput
, Tab, tab , Tab, tab
, Dialog, ExpansionPanel , Dialog, ExpansionPanel
, circularProgressIndicator , ProgressIndicator, circularProgressIndicator
) )
{-| This module contains different stateless view functions. No wiring required. {-| This module contains different stateless view functions. No wiring required.
@ -122,11 +122,7 @@ You can create you own widgets by sticking widgets types together.
# Progress Indicator # Progress Indicator
![ProgressIndicator](TODO) @docs ProgressIndicator, circularProgressIndicator
[Open in Ellie](TODO)
@docs ProgressIndicator, progressIndicator
-} -}
@ -634,6 +630,7 @@ tab =
- PROGRESS INDICATOR - PROGRESS INDICATOR
----------------------------------------------------------} ----------------------------------------------------------}
{-| Progress Indicator widget type {-| Progress Indicator widget type
If `maybeProgress` is set to `Nothing`, an indeterminate progress indicator (e.g. spinner) will display. If `maybeProgress` is set to `Nothing`, an indeterminate progress indicator (e.g. spinner) will display.

View File

@ -2,7 +2,7 @@ module Widget.Style exposing (ButtonStyle, ColumnStyle, DialogStyle, ExpansionPa
{-| This module contains style types for every widget. {-| This module contains style types for every widget.
@docs ButtonStyle, ColumnStyle, DialogStyle, ExpansionPanelStyle, LayoutStyle, RowStyle, SnackbarStyle, SortTableStyle, TabStyle, TextInputStyle @docs ButtonStyle, ColumnStyle, DialogStyle, ExpansionPanelStyle, LayoutStyle, RowStyle, SnackbarStyle, SortTableStyle, TabStyle, TextInputStyle, ProgressIndicatorStyle
-} -}

View File

@ -1282,7 +1282,8 @@ determinateCircularIcon color attribs progress =
clamp 0 1 progress clamp 0 1 progress
in in
-- 188 is circumference of circle in pixels -- 188 is circumference of circle in pixels
188 - (188 * clampedProgress) 188
- (188 * clampedProgress)
|> round |> round
in in
Svg.svg Svg.svg
@ -1311,6 +1312,8 @@ determinateCircularIcon color attribs progress =
|> Element.el attribs |> Element.el attribs
{-| A circular progress indicator
-}
progressIndicator : Palette -> ProgressIndicatorStyle msg progressIndicator : Palette -> ProgressIndicatorStyle msg
progressIndicator palette = progressIndicator palette =
{ containerFunction = { containerFunction =

View File

@ -1,6 +1,6 @@
module Widget.Style.Template exposing module Widget.Style.Template exposing
( box, decoration, icon ( box, decoration, icon
, button, column, dialog, expansionPanel, layout, progressIndicator, row, snackbar, sortTable, tab, textInput , button, column, dialog, expansionPanel, layout, row, snackbar, sortTable, tab, textInput, progressIndicator
) )
{-| ![Example using the Template style](https://orasund.github.io/elm-ui-widgets/assets/template-style.png) {-| ![Example using the Template style](https://orasund.github.io/elm-ui-widgets/assets/template-style.png)
@ -54,7 +54,7 @@ style =
# Mockups # Mockups
@docs button, column, dialog, expansionPanel, layout, row, snackbar, sortTable, tab, textInput @docs button, column, dialog, expansionPanel, layout, row, snackbar, sortTable, tab, textInput, progressIndicator
-} -}
@ -352,7 +352,7 @@ progressIndicator string =
-} -}
progressIndicator : String -> ProgressIndicatorStyle msg progressIndicator : String -> ProgressIndicatorStyle msg
progressIndicator string = progressIndicator string =
{ containerFunction = (\_ -> icon <| string ++ ":icon") { containerFunction = \_ -> icon <| string ++ ":icon"
} }