I have created a toggle switch in ELM but I want to use JSON.decode such that if the toggle button is ON, the Json indicates it such that { toggle: ON} and similarly if its OFF. Also, I have mentioned the default toggle as ON (onClick) but it doesn’t seem to be ON. How can I achieve this?
The codepen version of it is here ( which includes the styles ): https://ellie-app.com/bKG3H5mxKj3a1