Cannot initialize ColorPicker with a color
WoozyGoat opened this issue · 2 comments
WoozyGoat commented
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?
gdotdesign commented
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
WoozyGoat commented
Thanks a lot, it works ! I close this issue.