This code is valid.
<TextField name="email"
label="Your email"
inputProps={{
'data-cy': 'feedback-form-email',
}}
fullWidth
/>
This code is invalid, even with skipping type check by casting inputProps value as any, it does not work.
<Checkbox name="consent"
inputProps={{
'data-cy': 'feedback-form-consent',
}}
checked={this.state.model.sender_consent}
onChange={this.onChange('sender_consent')}/>
inputProps property refer to a different type when looking into Material UI source for Checkbox and TextField, but both have the same usage... and I expected them to work the same.
Checkbox doc: https://material-ui.com/api/checkbox/
PS: Unable to highligh the code with tsx, using html as fallback.