Skip to content
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

[material-ui][Typography] Trouble adding new boolean props #41769

Open
mtr1990 opened this issue Apr 4, 2024 · 2 comments
Open

[material-ui][Typography] Trouble adding new boolean props #41769

mtr1990 opened this issue Apr 4, 2024 · 2 comments
Assignees
Labels
component: Typography The React component. customization: theme Centered around the theming features package: material-ui Specific to @mui/material status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it

Comments

@mtr1990
Copy link

mtr1990 commented Apr 4, 2024

Steps to reproduce

I want to add new props inside a MUI component specifically Typography
Everything seems to work fine with number and string types. But with boolean type it gives a warning.

https://codesandbox.io/p/sandbox/elated-panna-lkccky?file=%2Fsrc%2FDemo.tsx%3A9%2C33****

Current behavior

These props are passed directly into the DOM:

image

Expected behavior

Adds new props that do not appear in the DOM. No error warning appears

image

Context

Add new props and style based on conditions from new props (not overwriting existing props)

Your environment

No response

Search keywords: Adding props

@mtr1990 mtr1990 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 4, 2024
@danilo-leal danilo-leal changed the title [Typography] Adding props [material-ui][Typography] Trouble adding new boolean props Apr 4, 2024
@danilo-leal danilo-leal added component: Typography The React component. package: material-ui Specific to @mui/material customization: theme Centered around the theming features labels Apr 4, 2024
@celik75
Copy link

celik75 commented Apr 12, 2024

Having same issue

@mnajdova
Copy link
Member

This is expected, we don't support introducing new props, exactly because of this issue. Did you find some documentation that contradict with this?

@mnajdova mnajdova added status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 18, 2024
@mnajdova mnajdova assigned mnajdova and unassigned siriwatknp Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Typography The React component. customization: theme Centered around the theming features package: material-ui Specific to @mui/material status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it
Projects
None yet
Development

No branches or pull requests

5 participants