mirror of
https://github.com/mdgriffith/elm-ui.git
synced 2024-09-11 17:16:02 +03:00
Merge branch 'master' of https://github.com/mdgriffith/elm-ui
This commit is contained in:
commit
263e8fdd8a
28
tests-rendering/cases/open/LabelledInputAlignRight.elm
Normal file
28
tests-rendering/cases/open/LabelledInputAlignRight.elm
Normal file
@ -0,0 +1,28 @@
|
||||
module LabelledInputAlignRight exposing (view)
|
||||
|
||||
import Testable.Element exposing (..)
|
||||
import Testable.Element.Input as Input
|
||||
|
||||
|
||||
view =
|
||||
layout [] <|
|
||||
column [ width fill ]
|
||||
[ Input.text
|
||||
[ width (px 200)
|
||||
, alignRight
|
||||
]
|
||||
{ onChange = always False
|
||||
, text = ""
|
||||
, placeholder = Nothing
|
||||
, label = Input.labelLeft [] (text "label")
|
||||
}
|
||||
, Input.text
|
||||
[ width (px 200)
|
||||
, alignRight
|
||||
]
|
||||
{ onChange = always False
|
||||
, text = ""
|
||||
, placeholder = Nothing
|
||||
, label = Input.labelHidden "label"
|
||||
}
|
||||
]
|
46
tests-rendering/cases/open/NearbyElementBordersOverlap.elm
Normal file
46
tests-rendering/cases/open/NearbyElementBordersOverlap.elm
Normal file
@ -0,0 +1,46 @@
|
||||
module NearbyElementBordersOverlap exposing (view)
|
||||
|
||||
{-| Elements placed with onLeft, onRight, above & below overlap main element's border
|
||||
|
||||
|
||||
# inFront elements with width fill are contained within the parent's border
|
||||
|
||||
<https://github.com/mdgriffith/elm-ui/issues/223>
|
||||
|
||||
In addition to the overlap, it affects layout in unexpected ways: eg if the elements
|
||||
are the same height, onLeft and onRight elements will be vertically offset
|
||||
from the main element.
|
||||
|
||||
-}
|
||||
|
||||
import Testable.Element exposing (..)
|
||||
import Testable.Element.Border as Border
|
||||
|
||||
|
||||
blue =
|
||||
rgb 0 0 1
|
||||
|
||||
|
||||
green =
|
||||
rgb 0 1 0
|
||||
|
||||
|
||||
grey =
|
||||
rgb 0.5 0.5 0.5
|
||||
|
||||
|
||||
view =
|
||||
layout [ width fill, height fill ] <|
|
||||
el
|
||||
[ centerX
|
||||
, centerY
|
||||
, Border.width 10
|
||||
, Border.color green
|
||||
, padding 50
|
||||
, above <| el [ Border.color grey, Border.width 10 ] <| text "above"
|
||||
, below <| el [ Border.color grey, Border.width 10 ] <| text "below"
|
||||
, onRight <| el [ Border.color blue, Border.width 10 ] <| text "onRight"
|
||||
, onLeft <| el [ Border.color blue, Border.width 10 ] <| text "onLeft"
|
||||
]
|
||||
<|
|
||||
text "Centre"
|
Loading…
Reference in New Issue
Block a user