-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"component" props does not exist on Drawer component #18991
Comments
👋 Thanks for using Material-UI! We use GitHub issues exclusively as a bug and feature requests tracker, however, For support, please check out https://material-ui.com/getting-started/support/. Thanks! If you have a question on StackOverflow, you are welcome to link to it here, it might help others. |
From the same section of the docs "Material-UI allows you to replace a component's root node via a component prop." could be taken to suggest that every component has a @JamieS1211 Would you like to make that clearer in the docs? |
So in my testing I was looking at what plain javascript outputted and I was getting:
I stupidly made the assumption that this had worked, guess my brain somehow decided it was in react props mode instead of HTML tag mode when checking if it had worked. I was also assuming that when component was not mentioned in the component props it was applying it to the HTML base element, glad I have been set straight. Moving forwards I think it would be a good idea to add that to the docs to just note that as you pointed out not every component has a In addition to this (I guess I should make a new issue / request ticket for this) what is your thoughts on allowing the component prop for the drawer so that people can specifically set the draw to use the "nav" html component for better accessibility usability? According to w3 schools "The |
@JamieS1211 The revised sentence looks good (wit an apostrophe in the second instance of "components"). Happy to be corrected here, but I believe that |
Discussion can be found at mui#18991
@mbrookes Thanks, added that with the apostrophe on the 2nd instance of component. Makes sense to nest the "nav" component, guess there isn't a direct reason to add ability to override the "div" to a "nav" other than decreasing the number of DOM elements. |
Hi there, I hope this is in the right place. I am trying to use the component prop of "Drawer" to set it to use the "nav" html element. The drawer API states:
I have had this working before moving to typescript. In typescript I get the error "Property 'component' does not exist on type 'IntrinsicAttributes & DrawerProps'". Here in the docs I found the following
I am assuming (and hoping) this is the case. Could you please confirm if this is the case and / or let me know if i'm being dumb (apologies).
Many thanks for reading, looking forward to a response
The text was updated successfully, but these errors were encountered: