Hi,
I am new Elm, I am trying to use elm-css. I have created separate module called SignupStyles.elm, below is the code which i have in there
inputTextStyle : Style
inputTextStyle =
Css.batch
[ display block
, padding2 (px 12) (px 20)
, margin2 (px 8) (px 0)
, border (px 0)
, borderRadius (px 4)
]
In the main module Signup.elm i import the style module using import SignupStyles.elm exposing (..)
.
I would like to add the above style to the text field
view : User -> Html msg
view user =
div []
[ h1 [] [ text "Sign up" ]
, Html.Styled.form []
[ div []
[ text "Name"
, input
[ inputTextStyle
]
[]
]
]
]
And i get the following error
The 1st argument to function
input
is causing a mismatch. - Functioninput
is expecting the 1st argument to be:
List (Attribute msg)
But it is:
List Style
I am unable to figure out a way to fix this issue. Kindly let me know how to fix this or if i have to change this approach altogether.
Thank You.