Add text to Switch formcontrol and change it in toggle using material ui
问题 I am using Material UI's Switch component and I want to add text inside it. Also I need to make it square in shape. How to I add text inside the Switch component. It should say on when selected and off when default. I am using Material UI's Switch inside Formcontrol in reactjs form. <FormControlLabel label="Private ? " labelPlacement="start" control={ <Switch checked={this.state.checked} onChange={this.handleChange} color='primary' /> } /> 回答1: Here is an example of how to change the text