-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #296 from berenddeboer/v6.0.0
Update to MDC v6.0.0
- Loading branch information
Showing
18 changed files
with
1,522 additions
and
1,546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
module Demo.CircularProgress exposing (Model, Msg(..), defaultModel, update, view) | ||
|
||
import Demo.Helper.Hero as Hero | ||
import Demo.Helper.ResourceLink as ResourceLink | ||
import Demo.Page as Page exposing (Page) | ||
import Html exposing (Html, text) | ||
import Material | ||
import Material.CircularProgress as CircularProgress | ||
import Material.Options exposing (styled) | ||
import Material.Typography as Typography | ||
|
||
|
||
type alias Model m = | ||
{ mdc : Material.Model m | ||
} | ||
|
||
|
||
defaultModel : Model m | ||
defaultModel = | ||
{ mdc = Material.defaultModel | ||
} | ||
|
||
|
||
type Msg m | ||
= Mdc (Material.Msg m) | ||
|
||
|
||
update : (Msg m -> m) -> Msg m -> Model m -> ( Model m, Cmd m ) | ||
update lift msg model = | ||
case msg of | ||
Mdc msg_ -> | ||
Material.update (lift << Mdc) msg_ model | ||
|
||
|
||
view : (Msg m -> m) -> Page m -> Model m -> Html m | ||
view lift page model = | ||
page.body | ||
[ Hero.view | ||
[ Hero.header "Circular Progress Indicator" | ||
, Hero.intro "Progress indicators display the length of a process or express an unspecified wait time." | ||
, Hero.component [] | ||
[ CircularProgress.view [ CircularProgress.progress 0.75 ] [] | ||
] | ||
] | ||
, ResourceLink.links (lift << Mdc) model.mdc "progress-indicators" "linear-progress" "mdc-linear-progress" | ||
, Page.demos | ||
[ styled Html.h3 [ Typography.subtitle1 ] [ text "Determinate" ] | ||
, CircularProgress.view [ CircularProgress.progress 0.75 ] [] | ||
, styled Html.h3 [ Typography.subtitle1 ] [ text "Indeterminate" ] | ||
, CircularProgress.view [ ] [] | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module Demo.Startpage.Svg.CircularProgress exposing (view) | ||
|
||
import Html exposing (Html) | ||
import Svg | ||
import Svg.Attributes as Svg exposing (cx, cy, fill, r, stroke, strokeDasharray, strokeDashoffset, strokeWidth, viewBox) | ||
|
||
|
||
view : Html msg | ||
view = | ||
Svg.svg | ||
[ viewBox "0 0 180 180" ] | ||
[ Svg.circle | ||
[ cx "90" | ||
, cy "90" | ||
, r "18" | ||
, fill "transparent" | ||
, stroke "black" | ||
, strokeDasharray "113.097" | ||
, strokeDashoffset "28.2743" | ||
, strokeWidth "4" | ||
] | ||
[] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.