Orasund / elm-ui-widgets

Collection of reusable views for elm-ui.
https://orasund.github.io/elm-ui-widgets/
BSD 3-Clause "New" or "Revised" License
85 stars 11 forks source link

Can't Customize button: code snippet in doc not working #91

Closed axelbdt closed 1 year ago

axelbdt commented 1 year ago

Hi, I encountered the following issue while trying the code snipped on top of the Widget.Customage page:

-- TYPE MISMATCH --------------- /home/axel/dev/elm-ui-widget-experimentation/src/Main.elm

This function cannot handle the argument sent through the (|>) pipe:

29|         (Material.containedButton
30|             |> Customize.element [ Element.width Element.fill ]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The argument is:

    Material.Palette -> Internal.Button.ButtonStyle msg

But (|>) is piping it to a function that expects:

    { a | element : List (Attribute msg) }

Here is a repo where I produced the bug.

Cheers

Orasund commented 1 year ago

the error tells you, that you are missing a Palette.