- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 32.7k
Closed
Labels
Description
This is a Typescript error
The ListItem component accepts label for the prop component but doesn't accept the htmlFor prop as it should
- This is a v1.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
If I provide a value of label to the prop component of the ListItem component I should also be able to provide the prop htmlFor
So
<ListItem component="label" htmlFor="foo" />should crate this HTML
<label for="foo />
Current Behavior
Instead I get the type error
Property 'htmlFor' does not exist on type 'IntrinsicAttributes & ListItemProps & { children?: ReactNode; }'.
Steps to Reproduce
Link: https://codesandbox.io/s/r0pr5qjnzq

Context
I try to use the label to trigger a hidden <input type="file" />
Your Environment
screendriver, lo1tuma and oliviertassinari