Simple switch component.
Use the onToggle method to detect changes in state, the parameter it in the method will be true if the switch is on, and false if it is off.
it
true
false