-
-
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
Add Slots to rating #45295
base: master
Are you sure you want to change the base?
Add Slots to rating #45295
Conversation
Netlify deploy previewhttps://deploy-preview-45295--material-ui.netlify.app/ Bundle size report |
|
||
export interface RatingOwnProps { | ||
export interface RatingOwnProps extends RatingSlotsAndSlotProps { |
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.
@siriwatknp @DiegoAndai is this the correct place to extend with RatingSlotsAndSlotProps? pnpm proptypes isn't generating the relevant docs for slots and slotProps in rating.js
Cant see what i've missed, a hint would be greatly appreciated 🤟
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.
Hey @harry-whorlow!
Try following Accordion.d.ts
implementation:
} & AccordionSlotsAndSlotProps; |
Does that work?
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.
@DiegoAndai, no still the same 🙃
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.
It has to be added to the RatingTypeMap
, not RatingOwnProps
, does it work with that change?
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.
@DiegoAndai yeah, thats what I did. Here is the commit changes dab6cfb.
line 163 of rating.d.ts, it still only updates the deprecated line in the rating.js and completely ignores the slots.
part of #41281
This PR adds slot the slot prop to rating, whilst deprecating components.
props.iconContainerComponent -> slot.iconContainer
[/] I have followed (at least) the PR section of the contributing guide.