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][ListItemText] Add slots and slotProps #44571

Merged
merged 17 commits into from
Dec 6, 2024

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Nov 27, 2024

part of #41281

Not sure about about argos failure, same issue can be seen in other PR's as well

example: https://app.argos-ci.com/mui/material-ui/builds/34017

@sai6855 sai6855 marked this pull request as draft November 27, 2024 10:26
@sai6855 sai6855 changed the title [material-ui][ListItemText] Add slots and slotProps [material-ui][ListItemText] WIP Add slots and slotProps Nov 27, 2024
@sai6855 sai6855 changed the title [material-ui][ListItemText] WIP Add slots and slotProps [material-ui][ListItemText] Add slots and slotProps Nov 27, 2024
@sai6855 sai6855 added docs Improvements or additions to the documentation component: list This is the name of the generic UI component, not the React module! deprecation New deprecation message package: material-ui Specific to @mui/material package: codemod Specific to @mui/codemod labels Nov 27, 2024
@mui-bot
Copy link

mui-bot commented Nov 27, 2024

Netlify deploy preview

ListItemText: parsed: +2.84% , gzip: +2.57%
@material-ui/core: parsed: +0.04% , gzip: +0.08%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 24e8451

export interface ListItemTextSlots {
/**
* The component that renders the main content.
* @default span
Copy link
Member

@siriwatknp siriwatknp Dec 2, 2024

Choose a reason for hiding this comment

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

Please check https://github.com/mui/material-ui/pull/44570/files#diff-655ffb1d0cc5de911e82c2f708a9a1617a8c9acf40f7832ee468a98353bbdf4eR37

Suggested change
* @default span
* The component that renders the primary slot.
* @default Typography

@sai6855 sai6855 marked this pull request as ready for review December 2, 2024 09:12
Comment on lines 21 to 26
export type ListItemTextSlotsAndSlotProps = CreateSlotsAndSlotProps<
ListItemTextSlots,
{
primary: SlotProps<React.ElementType<HTMLSpanElement>, {}, ListItemTextOwnerState>;
secondary: SlotProps<React.ElementType<HTMLParagraphElement>, {}, ListItemTextOwnerState>;
}
Copy link
Member

Choose a reason for hiding this comment

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

Please check https://github.com/mui/material-ui/pull/44570/files#diff-655ffb1d0cc5de911e82c2f708a9a1617a8c9acf40f7832ee468a98353bbdf4eR83

I think it's nice to add description to the slotProps with links to the API page in case it's a another component. The DX is a lot better.

@sai6855 sai6855 requested a review from siriwatknp December 2, 2024 11:43
@sai6855 sai6855 requested a review from siriwatknp December 2, 2024 13:51
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

👍

@sai6855 sai6855 merged commit 6d681ff into mui:master Dec 6, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: list This is the name of the generic UI component, not the React module! deprecation New deprecation message docs Improvements or additions to the documentation package: codemod Specific to @mui/codemod package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants