gdotdesign/elm-ui

Cannot initialize ColorPicker with a color

WoozyGoat opened this issue · 2 comments

Documentation says that we can initialize ColorPicker in this way :
colorPicker = Ui.ColorPicker.init Color.yellow

But when I tried that, I got this error :
Functioninitis expecting the argument to be: () But it is: Color.Color

Is this a bug, or am I doing something wrong?

The documentation is wrong in this case.

You can initialize a new Ui.ColorPicker with:

( colorPicker, cmd ) = 
  Ui.ColorPicker.init ()
  |> Ui.ColorPicker.setValue Color.Yellow

Thanks a lot, it works ! I close this issue.