Skip to content

Commit

Permalink
[material-ui] Fix wrong slotProps of DetailsHTMLAttributes types (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp authored Feb 5, 2025
1 parent a85cd3e commit 0435346
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 35 deletions.
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

0 comments on commit 0435346

Please sign in to comment.