-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Closed
Labels
scope: alertChanges related to the alert.Changes related to the alert.type: regressionA bug, but worse, it used to behave as expected.A bug, but worse, it used to behave as expected.
Description
Steps to reproduce
Steps:
- Create a custom theme using
createTheme - Configure
MuiAlertcomponent:
const theme = createTheme({
components: {
MuiAlert: {
defaultProps: {
slots: {
closeIcon: CloseRounded,
},
},
},
},
});Current behavior
TypeScript gives the following error:
Object literal may only specify known properties, but 'slots' does not
exist in type 'Partial<AlertProps>'. Did you mean to write 'slot'?
Expected behavior
It shouldn't throw an error and it should work the same as in the previous 5.15.10 version.
Context
In our application we customised the default theme using the createTheme utility.
Your environment
npx @mui/envinfo
System:
OS: macOS 14.3.1
Binaries:
Node: 20.11.1 - /opt/homebrew/opt/nvm/versions/node/v20.11.1/bin/node
npm: 10.2.4 - /opt/homebrew/opt/nvm/versions/node/v20.11.1/bin/npm
pnpm: Not Found
npmPackages:
@emotion/react: 11.11.4 => 11.11.4
@emotion/styled: 11.11.0 => 11.11.0
@mui/base: 5.0.0-beta.37
@mui/core-downloads-tracker: 5.15.11
@mui/icons-material: 5.15.11 => 5.15.11
@mui/lab: 5.0.0-alpha.166 => 5.0.0-alpha.166
@mui/material: 5.15.11 => 5.15.11
@mui/private-theming: 5.15.11
@mui/styled-engine: 5.15.11
@mui/system: 5.15.11
@mui/types: 7.2.13
@mui/utils: 5.15.11
@mui/x-data-grid: 6.19.5 => 6.19.5
@mui/x-date-pickers: 6.19.5 => 6.19.5
@types/react: 18.2.61 => 18.2.61
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
typescript: 5.3.3 => 5.3.3
Search keywords: Alert, slots, 5.15.11
cristi-shoreline and adrian-shorelinesai6855
Metadata
Metadata
Assignees
Labels
scope: alertChanges related to the alert.Changes related to the alert.type: regressionA bug, but worse, it used to behave as expected.A bug, but worse, it used to behave as expected.