git.iko.soy/typeable/elm-ui
on master help sign in
make example testable
510b32aElm UI Automation
tests-rendering/cases/open/WeirdCentering.elm+18−22
@@ -1,31 +1,27 @@
1−module Main exposing (main)
1+module WeirdCentering exposing (main)
2
2
3−import Browser
3+import Html exposing (Html)
4−import Element
4+import Testable.Element exposing (..)
5−import Element.Background as Background
5+import Testable.Element.Background as Background
6−import Element.Input as Input
7−import Html exposing (Html, button, div, text)
8−import Html.Events exposing (onClick)
9
6
10
7
11−main : Html msg
12main =
8main =
13− Element.layout [] <|
9+ layout [] <|
14− Element.column []
10+ column []
15− [ Element.text "Example with centerX:"
11+ [ text "Example with centerX:"
16− , Element.row
12+ , row
17− [ Element.width Element.fill ]
13+ [ width fill ]
18− [ Element.row [ Element.centerX, Background.color <| Element.rgb255 0 200 0 ]
14+ [ row [ centerX, Background.color <| rgb 0 1 0 ]
19− [ Element.paragraph [ Element.width Element.shrink ] [ Element.text "Hello world" ]
15+ [ paragraph [ width shrink ] [ text "Hello world" ]
20− , Element.paragraph [ Element.width Element.shrink ] [ Element.text "Hello world" ]
16+ , paragraph [ width shrink ] [ text "Hello world" ]
21 ]
17 ]
22 ]
18 ]
23− , Element.text "Example without centerX:"
19+ , text "Example without centerX:"
24− , Element.row
20+ , row
25− [ Element.width Element.fill ]
21+ [ width fill ]
26− [ Element.row [ Background.color <| Element.rgb255 0 200 0 ]
22+ [ row [ Background.color <| rgb 0 1 0 ]
27− [ Element.paragraph [ Element.width Element.shrink ] [ Element.text "Hello world" ]
23+ [ paragraph [ width shrink ] [ text "Hello world" ]
28− , Element.paragraph [ Element.width Element.shrink ] [ Element.text "Hello world" ]
24+ , paragraph [ width shrink ] [ text "Hello world" ]
29 ]
25 ]
30 ]
26 ]
31 ]
27 ]