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][Button] Add target attribute to types #41458

Conversation

KumarNitin19
Copy link
Contributor

@KumarNitin19 KumarNitin19 commented Mar 12, 2024

Fixes #41452

@mui-bot
Copy link

mui-bot commented Mar 12, 2024

Netlify deploy preview

https://deploy-preview-41458--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against ecda56b

@zannager zannager added the component: button This is the name of the generic UI component, not the React module! label Mar 12, 2024
@mj12albert mj12albert self-assigned this Mar 14, 2024
@mj12albert mj12albert added typescript package: material-ui Specific to @mui/material labels Mar 14, 2024
@mj12albert mj12albert changed the title [material-ui] Target Type Added To Button Component [material-ui][Button] Target Type Added To Button Component Mar 14, 2024
@mj12albert mj12albert changed the title [material-ui][Button] Target Type Added To Button Component [material-ui][Button] Update Button types to support target attribute Mar 14, 2024
@mj12albert mj12albert changed the title [material-ui][Button] Update Button types to support target attribute [material-ui][Button] Update types to support target attribute Mar 15, 2024
@mj12albert mj12albert changed the title [material-ui][Button] Update types to support target attribute [material-ui][Button] Add target attribute to types Mar 15, 2024
Copy link
Member

@mj12albert mj12albert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KumarNitin19 I've tweaked the tests a bit, thanks for working on this!

@KumarNitin19
Copy link
Contributor Author

@KumarNitin19 I've tweaked the tests a bit, thanks for working on this!

@mj12albert Thanks!

Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the fix here is wrong. The Material UI Button component extends from ButtonBase, which already inherits from native HTML button or a elements. And the a anchor element inherently include the target property.

@KumarNitin19
Copy link
Contributor Author

I believe the fix here is wrong. The Material UI Button component extends from ButtonBase, which already inherits from native HTML button or a elements. And the a anchor element inherently include the target property.

@ZeeshanTamboli Yes you're right, I think It's a problem with component prop type.

@ZeeshanTamboli
Copy link
Member

Since this PR is inactive, I am closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: button This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material typescript
Projects
None yet
7 participants