I am using an Ant Design checkbox in my project.
This is how my code looks:
<Checkbox checked={this.state.D} onChange={(e)=> this.setState({ D: e.target.checked})}>D</Checkbox>
<Checkbox checked={this.state.L} onChange={(e)=> this.setState({ L: e.target.checked})}>L</Checkbox>
<Checkbox checked={this.state.M} onChange={(e)=> this.setState({ M: e.target.checked})}>M</Checkbox>
<Checkbox checked={this.state.M1} onChange={(e)=> this.setState({ M1: e.target.checked})}>M</Checkbox>
<Checkbox checked={this.state.J} onChange={(e)=> this.setState({ J: e.target.checked})}>J</Checkbox>
When I run the code, I see this output:
https://i.sstatic.net/XL9LN.png
However, I would like it to display text inside the checkboxes, similar to this:
https://i.sstatic.net/auKyv.png
Could you please advise me on how to achieve this desired rendering?