if a left content is specified then clicking on it will switch the Toggle off.
if a right content is specified then clicking on it will switch the Toggle on.
if both side contents are specified then clicking left will switch off and clicking right will switch on.
I believe cases 1 and 2 are counter-intuitive. If there is content defined on one side only I would expect that it's just the name for this variable and that clicking the label would have the same effect as clicking on the Toggle itself.
If there are contents on both sides then I would expect that they are "on/off" labels, therefore case 3 is fine with me.
So I updated the code so that:
if a left content only is specified then clicking on it will switch the Toggle on and off.
if a right content only is specified then clicking on it will switch the Toggle on and off.
if both side contents are specified then clicking left will switch off and clicking right will switch on.
Currently:
I believe cases 1 and 2 are counter-intuitive. If there is content defined on one side only I would expect that it's just the name for this variable and that clicking the label would have the same effect as clicking on the Toggle itself.
If there are contents on both sides then I would expect that they are "on/off" labels, therefore case 3 is fine with me.
So I updated the code so that: