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] Fix wrong slotProps of DetailsHTMLAttributes types #45215

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions packages/mui-material/src/Alert/Alert.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,17 @@ export type AlertSlotsAndSlotProps = CreateSlotsAndSlotProps<
* Props forwarded to the icon slot.
* By default, the avaible props are based on a div element.
*/
icon: SlotProps<
React.ElementType<React.DetailsHTMLAttributes<HTMLDivElement>>,
AlertIconSlotPropsOverrides,
AlertOwnerState
>;
icon: SlotProps<'div', AlertIconSlotPropsOverrides, AlertOwnerState>;
/**
* Props forwarded to the message slot.
* By default, the avaible props are based on a div element.
*/
message: SlotProps<
React.ElementType<React.DetailsHTMLAttributes<HTMLDivElement>>,
AlertMessageSlotPropsOverrides,
AlertOwnerState
>;
message: SlotProps<'div', AlertMessageSlotPropsOverrides, AlertOwnerState>;
/**
* Props forwarded to the action slot.
* By default, the avaible props are based on a div element.
*/
action: SlotProps<
React.ElementType<React.DetailsHTMLAttributes<HTMLDivElement>>,
AlertActionSlotPropsOverrides,
AlertOwnerState
>;
action: SlotProps<'div', AlertActionSlotPropsOverrides, AlertOwnerState>;
/**
* Props forwarded to the closeButton slot.
* By default, the avaible props are based on the [IconButton](https://mui.com/material-ui/api/icon-button/#props) component.
Expand Down
24 changes: 4 additions & 20 deletions packages/mui-material/src/CardHeader/CardHeader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,38 +60,22 @@ export type CardHeaderSlotsAndSlotProps = CreateSlotsAndSlotProps<
* Props forwarded to the root slot.
* By default, the avaible props are based on the div element.
*/
root: SlotProps<
React.ElementType<React.DetailsHTMLAttributes<HTMLDivElement>>,
CardHeaderRootSlotPropsOverrides,
CardHeaderOwnerState
>;
root: SlotProps<'div', CardHeaderRootSlotPropsOverrides, CardHeaderOwnerState>;
/**
* Props forwarded to the avatar slot.
* By default, the avaible props are based on the div element.
*/
avatar: SlotProps<
React.ElementType<React.DetailsHTMLAttributes<HTMLDivElement>>,
CardHeaderAvatarSlotPropsOverrides,
CardHeaderOwnerState
>;
avatar: SlotProps<'div', CardHeaderAvatarSlotPropsOverrides, CardHeaderOwnerState>;
/**
* Props forwarded to the action slot.
* By default, the avaible props are based on the div element.
*/
action: SlotProps<
React.ElementType<React.DetailsHTMLAttributes<HTMLDivElement>>,
CardHeaderActionSlotPropsOverrides,
CardHeaderOwnerState
>;
action: SlotProps<'div', CardHeaderActionSlotPropsOverrides, CardHeaderOwnerState>;
/**
* Props forwarded to the content slot.
* By default, the avaible props are based on the div element.
*/
content: SlotProps<
React.ElementType<React.DetailsHTMLAttributes<HTMLDivElement>>,
CardHeaderContentSlotPropsOverrides,
CardHeaderOwnerState
>;
content: SlotProps<'div', CardHeaderContentSlotPropsOverrides, CardHeaderOwnerState>;
/**
* Props forwarded to the title slot (as long as disableTypography is not `true`).
* By default, the avaible props are based on the [Typography](https://mui.com/material-ui/api/typography/#props) component.
Expand Down