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 ]
|> List.map
(\completeness ->
( "Determinate Progress Indicator, completeness " ++ String.fromFloat completeness
( "Completeness " ++ String.fromFloat completeness
, Widget.circularProgressIndicator style.progressIndicator (Just completeness)
)
)

View File

@ -9,7 +9,7 @@ module Widget exposing
, TextInput, textInput
, Tab, tab
, Dialog, ExpansionPanel
, circularProgressIndicator
, ProgressIndicator, circularProgressIndicator
)
{-| 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
![ProgressIndicator](TODO)
[Open in Ellie](TODO)
@docs ProgressIndicator, progressIndicator
@docs ProgressIndicator, circularProgressIndicator
-}
@ -634,6 +630,7 @@ tab =
- PROGRESS INDICATOR
----------------------------------------------------------}
{-| Progress Indicator widget type
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.
@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
in
-- 188 is circumference of circle in pixels
188 - (188 * clampedProgress)
188
- (188 * clampedProgress)
|> round
in
Svg.svg
@ -1311,6 +1312,8 @@ determinateCircularIcon color attribs progress =
|> Element.el attribs
{-| A circular progress indicator
-}
progressIndicator : Palette -> ProgressIndicatorStyle msg
progressIndicator palette =
{ containerFunction =

View File

@ -1,6 +1,6 @@
module Widget.Style.Template exposing
( 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)
@ -54,7 +54,7 @@ style =
# 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 =
{ containerFunction = (\_ -> icon <| string ++ ":icon")
{ containerFunction = \_ -> icon <| string ++ ":icon"
}