-
-
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
[TypographyProps] add "component" property to typescript types #19512
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. |
Please fill out the template. |
I found, there is no issue on Material-UI side |
@eps1lon how can I reopen this issue, I have updated the description, it's material-ui issue |
so,
) what is better? |
Yes, other components are affected too e.g. this is not possible
but this is
thus it makes sense to fix |
…bleComponent" does (mui#19512)
…bleComponent" does (mui#19512)
When diving in #20191, I was wondering if developers building on top of the import React from 'react';
import Typography, { TypographyProps } from '@material-ui/core/Typography';
export default function Types(props: TypographyProps) {
return (
<Typography {...props}>
h1. Heading
</Typography>
);
} |
I'm having the same issue when using the Typography component as a styled component: // Property 'component' does not exist on type [...]
<StyledTypography variant="h3" component="h2">
Organization
</StyledTypography>
Edit |
I made a hacky solution for Typography, check out my comment on this other issue |
I'm closing for now. Let's wait for a new report on v5. |
This issue still exist in v5. What is the best possible way to reopen it? |
This helped me. |
This still happens. Is there a fix if one does not want to use @srghma 's last example actually worked for me as a fix (thanks a lot) |
I'm getting another issue, but I suspect it being intimately related to the same core issue. const ModuleTitle: FunctionComponent<TypographyProps> = (props) => (
<Typography variant='h5' {...props} />
)
const Index = (props) => (
<Container>
<ModuleTitle>Hey</ModuleTitle>
</Container>
) Gives me
(trying not to reopen, just tell me if unrelated, I'll delete that comment) |
I also have the same issue with:
|
@oliviertassinari any news on this? |
This definitely should not be closed. We are still experiencing this issue with |
any update on this? |
Current Behavior 😯
TypographyProps doesnt have component prop
Expected Behavior 🤔
TypographyProps should have component prop
Steps to Reproduce 🕹
Steps:
does not compile
this compiles
this compiles too
but this does not
error
but if I do
it compiles again
Context 🔦
https://github.com/dwhitney/purescript-react-basic-mui/issues/28#issuecomment-581070959
Your Environment 🌎
The text was updated successfully, but these errors were encountered: