Skip to content

[material-ui][ListItemText] Add slots and slotProps - #44571

Merged
sai6855 merged 17 commits into
mui:masterfrom
sai6855:slots-listitem-text
Dec 6, 2024
Merged

[material-ui][ListItemText] Add slots and slotProps#44571
sai6855 merged 17 commits into
mui:masterfrom
sai6855:slots-listitem-text

Conversation

@sai6855

@sai6855 sai6855 commented Nov 27, 2024

Copy link
Copy Markdown
Member

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. scope: list Changes related to the list deprecation New deprecation message. package: material-ui package: codemod Specific to codemod. labels Nov 27, 2024
@mui-bot

mui-bot commented Nov 27, 2024

Copy link
Copy Markdown

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

@siriwatknp siriwatknp Dec 2, 2024

Copy link
Copy Markdown
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-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
Copy Markdown
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
Comment thread packages/mui-material/src/ListItemText/ListItemText.d.ts Outdated
@sai6855
sai6855 requested a review from siriwatknp December 2, 2024 13:51
Comment thread packages/mui-material/src/ListItemText/ListItemText.js

@siriwatknp siriwatknp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecation New deprecation message. docs Improvements or additions to the documentation. package: codemod Specific to codemod. scope: list Changes related to the list

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants