Type error when setting component on DialogContentText
See original GitHub issue- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
This:
<DialogContentText component="div" />
Throws:
Property ‘component’ does not exist on type ‘IntrinsicAttributes & DialogContentTextProps & { children?: ReactNode; }’. TS2769
Expected Behavior 🤔
Should accept component
as a valid prop
Steps to Reproduce 🕹
https://codesandbox.io/s/charming-mccarthy-mx1kf
Steps:
- Load sandbox URL
- Wait a while… takes long for the error to appear
Context 🔦
I want the component to be a div
so I can put <ul>
inside which would be invalid inside a <p>
Your Environment 🌎
Tech | Version |
---|---|
Material-UI | 4.8.2 |
React | 16.12.0 |
Browser | Chrome |
TypeScript | 3.7.4 |
{
"compilerOptions": {
"baseUrl": "src",
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
"downlevelIteration": true,
"importHelpers": true
},
"include": ["src"]
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Type error when setting component on DialogContentText
The issue is present in the latest release. I have searched the issues of this repository and believe that this is not a...
Read more >reactjs - Material-UI 4.8.1 API change - new way to specify the ...
What's the new way to specify way to specify the base component used by DialogContentText ? My project is a standard create-react-app setup, ......
Read more >InputLabel API - Material UI - MUI
API reference docs for the React InputLabel component. ... Name, Type, Default, Description ... If true , the label is displayed in an...
Read more >@material-ui/core DialogContentText JavaScript Examples
This page shows JavaScript code examples of @material-ui/core DialogContentText.
Read more >Strapi API creation: A quick guide - LogRocket Blog
Adding a RESTful login dialog component; Switching from SQLite to PostgreSQL. Setting up the work environment. Strapi requires Node.js installed ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds like
Drawer
never took component in the first place, but it was implied by the doco that it did. If someone wants to refactorDrawer
so that it does allow specification of a component - it seems like that should be a separate issue.Problem seems to have been introduced with 4.8.1 and affects other components like
Drawer
, see https://stackoverflow.com/q/59494907/924597