git.iko.soy/typeable/elm-ui
on master help sign in
text area open case
commitf9e315ff0ed29e83734bd7cf753a46023e83f497 authorMatthew Griffith <mdg.griffith@gmail.com> dateWed 3 Jul 2019, 09:12 (7 years ago) parent4040196
1 file changed+60
cases/open/TextAreaMax.elm+60
cases/open/TextAreaMax.elmnew file+60
@@ -0,0 +1,60 @@
1+module Main exposing (main)
2+
3+import Element exposing (..)
4+import Element.Background as Bg
5+import Element.Font as Font
6+import Element.Input as Input
7+
8+
9+large =
10+ """Hi
11+Hello
12+ -->
13+
14+ World!"""
15+
16+
17+empty =
18+ ""
19+
20+
21+singleLine =
22+ "Hello World! ->"
23+
24+
25+main =
26+ Element.layout [ width fill, height fill, Font.color (rgb 1 0 0) ] <|
27+ column [ width fill, height fill ]
28+ [ Input.multiline
29+ [ centerX
30+ , spacing 20
31+
32+ -- , height (px 100)
33+ , width shrink
34+ ]
35+ { onChange = always ()
36+ , text = empty
37+ , placeholder = Just (Input.placeholder [] (text "hello"))
38+ , label = Input.labelAbove [] none
39+ , spellcheck = False
40+ }
41+ , el
42+ [ width <| px 500
43+ , height <| px 20
44+ , Bg.color <| rgb255 0 0 0
45+ , centerX
46+ ]
47+ none
48+ , Input.text
49+ [ centerX
50+
51+ -- , spacing 20
52+ -- , height (px 100)
53+ , width shrink
54+ ]
55+ { onChange = always ()
56+ , text = empty
57+ , placeholder = Just (Input.placeholder [] (text "hello"))
58+ , label = Input.labelAbove [] (text "labeled")
59+ }
60+ ]