-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Open
Labels
component: snackbarThis is the name of the generic UI component, not the React module!This is the name of the generic UI component, not the React module!component: transitionsThis is the name of the generic UI component, not the React module!This is the name of the generic UI component, not the React module!typescript
Description
Duplicates
- I have searched the existing issues
Related page
https://mui.com/material-ui/react-snackbar/#control-slide-direction
Kind of issue
Broken demonstration
Issue description
I was looking for "Control Slide direction" and it appears that Types of property 'children' are incompatible.
Here is the my working env conf:
uname -a
: Linux kasir-lifebooke736 6.1.19-1-MANJARO Added link to demo (on gh-pages) #1 SMP PREEMPT_DYNAMIC Mon Mar 13 12:59:35 UTC 2023 x86_64 GNU/Linuxnode -v
: v19.7.0npm -v
: 9.5.0pnpm -v
: 7.29.0- "react": "^18.2.0"
- "@emotion/react": "^11.10.6",
- "@emotion/styled": "^11.10.6",
- "@mui/icons-material": "^5.11.16",
- "@mui/material": "^5.11.16",
And here is the complete error:
Type '{ direction: "right"; appear?: boolean; enter?: boolean; exit?: boolean; timeout?: number | { appear?: number; enter?: number; exit?: number; } | { appear?: number; enter?: number; exit?: number; }; in?: boolean; ... 270 more ...; onTransitionEndCapture?: TransitionEventHandler<...>; }' is not assignable to type 'SlideProps'.
Types of property 'children' are incompatible.
Type 'ReactNode' is not assignable to type 'ReactElement<any, any>'.
Type 'string' is not assignable to type 'ReactElement<any, any>'.ts(2322)
Context 🔦
I was using snackbars and transitions without problem in the browser (pnpm dev
), but VSCode shows me this error.
Metadata
Metadata
Assignees
Labels
component: snackbarThis is the name of the generic UI component, not the React module!This is the name of the generic UI component, not the React module!component: transitionsThis is the name of the generic UI component, not the React module!This is the name of the generic UI component, not the React module!typescript