Environment
- Package version(s): 6.3.2
- Operating System: MacOS
- Browser name and version: Island, latest
Code Sandbox
Testable by adding simply:
<Switch
{...switchProps}
labelElement={"Bug Test: Only ON label"}
innerLabelChecked="on"
innerLabel=""
/>
<Switch
{...switchProps}
labelElement={"Bug Test: Only OFF label"}
innerLabelChecked=""
innerLabel="off"
/>
Steps to reproduce
- Give a switch an off inner label
- Leave its on inner label blank
- Turn it on and off, notice the label is present for both
- Do the reverse (label for on only) and notice it's only present in the on state
Actual behavior
Label is present in both on and off state, even when just specified in off state
Expected behavior
Should only appear for specified state
Proof of issue
