git.iko.soy/typeable/elm-ui
on dfef577 help sign in
53 lines 1.1 kB history raw
1module Generator exposing (..)
3{-| -}
5import Testable
6import Testable.Element as Element exposing (..)
9-- sizes : (List (Testable.Attr msg) -> Testable.Element msg -> Testable.Element msg) -> List (Testable.Element msg)
12sizes render =
13 List.concatMap
14 (\( widthLen, heightLen ) ->
15 [ text (Debug.toString ( widthLen, heightLen ))
16 , render
17 (\attrs children ->
18 el
19 (width widthLen
20 :: height heightLen
21 :: attrs
22 )
23 children
24 )
25 ]
26 )
27 allLengthPairs
30allLengthPairs : List ( Length, Length )
31allLengthPairs =
32 let
33 crossProduct len =
34 List.map (Tuple.pair len) lengths
35 in
36 List.concatMap crossProduct lengths
39lengths =
40 [ px 50
41 , fill
42 , shrink
43 , fill
44 |> maximum 100
45 , fill
46 |> maximum 100
47 |> minimum 50
48 , shrink
49 |> maximum 100
50 , shrink
51 |> maximum 100
52 |> minimum 50
53 ]