Hi,
I’m new to Elm and trying to use elm-css with elm-pointer-events.
But I’m getting the following error:
TYPE MISMAT CH - The 1st argument to `p` is not what I expect:
29| [ p
30|#># [ Mouse.onClick Click ]
31| [ text <| Debug.toString event ]
This argument is a list of type:
List #(Html.Attribute Msg)#
But `p` needs the 1st argument to be:
List #(Attribute msg)#
Any thoughts on how to solve this?
Sourcecode:
module Mouse exposing (..)
import Browser
import Html.Events.Extra.Mouse as Mouse
import Html.Styled exposing (..)
-- import Html exposing (..)
main : Program () Msg Msg
main =
Browser.sandbox
{ init = None
, view = view
, update = always
}
type Msg
= None
| Click Mouse.Event
view : Msg -> Html Msg
view event =
div []
[ p
[ Mouse.onClick Click ]
[ text <| Debug.toString event ]
]