So. I want to add a button on the label of RadioButton.
For example, 'remove the option' button.
Expecting to be able to add MORE THAN JUST TEXT in the label of a radio...
Currently I replace the RadioButton with just a div, and cant add component inside the label.
Getting this message:
input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`
| Tech | Version |
|--------------|---------|
| Material-UI | 0.18.5 |
| React | 15.6.1 |
| browser | Google Chrome 63.0.3239.132 |
| etc | |
OK found how to do that.
Just wrap the content of the label with span and on the button make zIndex of higher magnitude than the radio button.
For example:
<RadioButton
value='option-1'
label={<span>Option 1 <FlatButton label={this.context.t("Remove")} onTouchTap={() => this.removeOption('option-1')} style={{zIndex: '999'}}/></span>}
/>
Most helpful comment
OK found how to do that.
Just wrap the content of the label with
spanand on the button make zIndex of higher magnitude than the radio button.For example: