🎨 clean up uses of TextIntput.view_

This commit is contained in:
Tessa Kelly 2018-03-16 16:45:24 -07:00
parent 15a3cb407f
commit ca240968f0

View File

@ -83,17 +83,17 @@ number =
{-| -}
view : Model value msg -> Html msg
view model =
view_ OverlappingLabel [] model
view_ [ styles.class [ OverlappingLabel ] ] model
{-| -}
withInvisibleLabel : Model value msg -> Html msg
withInvisibleLabel model =
view_ InvisibleLabel [ Accessibility.Style.invisible ] model
view_ [ Accessibility.Style.invisible ] model
view_ : CssClasses -> List (Html.Attribute msg) -> Model value msg -> Html msg
view_ labelClass attributes model =
view_ : List (Html.Attribute msg) -> Model value msg -> Html msg
view_ attributes model =
let
idValue =
"Nri-Ui-TextInput-" ++ dashify model.label
@ -113,18 +113,13 @@ view_ labelClass attributes model =
]
[]
, label
([ for idValue
, styles.class [ labelClass ]
]
++ attributes
)
(for idValue :: attributes)
[ Html.text model.label ]
]
type CssClasses
= InvisibleLabel
| OverlappingLabel
= OverlappingLabel
| Input
| OverlappingLabelInput
| IsInError