-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Conversation
Netlify deploy previewhttps://deploy-preview-44199--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
|
||
export interface IconContainerProps extends React.HTMLAttributes<HTMLSpanElement> { | ||
value: number; | ||
} | ||
|
||
export interface RatingPropsSizeOverrides {} | ||
|
||
export interface RatingProps | ||
extends StandardProps<React.HTMLAttributes<HTMLSpanElement>, 'children' | 'onChange'> { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this 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.
This PR adds
component
prop toRating
component, check #44181 (comment) for the why