mirror of
https://github.com/Orasund/elm-ui-widgets.git
synced 2024-09-11 06:25:32 +03:00
Applying Elm-Analyse
This commit is contained in:
parent
1dfb6057db
commit
bd96c7cf3f
@ -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)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -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.
|
||||||
|
@ -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
|
||||||
|
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
@ -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 =
|
||||||
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user