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][Rating] Add component prop #44199

Merged
merged 8 commits into from
Oct 30, 2024

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Oct 24, 2024

This PR adds component prop to Rating component, check #44181 (comment) for the why

@sai6855 sai6855 marked this pull request as draft October 24, 2024 07:51
@sai6855 sai6855 added new feature New feature or request package: material-ui Specific to @mui/material component: rating This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature and removed enhancement This is not a bug, nor a new feature labels Oct 24, 2024
@mui-bot
Copy link

mui-bot commented Oct 24, 2024

Netlify deploy preview

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

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 4e3c15c


export interface IconContainerProps extends React.HTMLAttributes<HTMLSpanElement> {
value: number;
}

export interface RatingPropsSizeOverrides {}

export interface RatingProps
extends StandardProps<React.HTMLAttributes<HTMLSpanElement>, 'children' | 'onChange'> {
Copy link
Contributor Author

@sai6855 sai6855 Oct 24, 2024

Choose a reason for hiding this comment

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

This felt unnecessary. From my understanding of StandardProps, it seems like StandardProps removes the classes prop and whatever types are passed in the second argument. Even after removing this piece of code, the types of both onChange and children remain unaffected.

Tests in this file seems to confirm same https://github.com/mui/material-ui/pull/44199/files#diff-d2ea835e807d4687379ca84a765aad7416671765d6add33c16ef46bd6bd1499c

@sai6855 sai6855 marked this pull request as ready for review October 24, 2024 12:29
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.

Code looks good to me. I’ll let @mnajdova decide on approval and merging if she finds this PR useful for #44181.

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for adding it.

@sai6855 sai6855 merged commit 744c6bd into mui:master Oct 30, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: rating This is the name of the generic UI component, not the React module! new feature New feature or request package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants