Closed brainlid closed 6 months ago
The following code example from the README's "configuration" section is incorrect:
<LiveToast.toast_group flash={@flash} connected={assigns[:socket] != nil} toast_class_fn={MyModule.toast_class_fn/1} />
I'm embarrassed to say it took me longer than it should have to find the issue. Corrected version:
<LiveToast.toast_group flash={@flash} connected={assigns[:socket] != nil} toast_class_fn={&MyModule.toast_class_fn/1} />
It is missing the & on the toast_class_fn. The error it was giving me was throwing me off.
&
toast_class_fn
Thank you Mark, sorry about that!
Fixed in: https://github.com/srcrip/live_toast/commit/67f7c5b03240ce5c09b4fbeffb3b096c5adc2217 and new docs deployed
The following code example from the README's "configuration" section is incorrect:
I'm embarrassed to say it took me longer than it should have to find the issue. Corrected version:
It is missing the
&
on thetoast_class_fn
. The error it was giving me was throwing me off.