Topic: Switch Features
datashield asked 6 years ago
Hello,
I was wondering if it is pasdfasdossible to change the text on the Switches from On and Off to custom text.
I was also wondering if the element can be updated to show Off on the left side like it is shown in the documentation here
Jakub Mandra staff premium answered 6 years ago
Hi,
Switch is armed with properties: labelLeft
and labelRight
which let you smoothly change those labels.
We are sorry for the lacks in the documentation -> we have made up it right now after your reports.
Example usage:
<MDBSwitch
checked={this.state.switchState}
getValue={this.handleSwitchChange}
labelLeft="No"
labelRight="Yes"
/>
Wish you best,
Jakub
Jakub Mandra staff premium commented 6 years ago
Also we have to update default labels, so the Off
will be on the left.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: 4.8.4
- Device: Laptop
- Browser: Google Chrome 71.0.3578.98
- OS: Windows 10
- Provided sample code: No
- Provided link: Yes