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

[docs] Snackbar, control Slide direction. Type of property children are incompatible #36806

Open
1 task done
kasir-barati opened this issue Apr 8, 2023 · 2 comments
Open
1 task done
Assignees
Labels
component: snackbar This is the name of the generic UI component, not the React module! component: transitions This is the name of the generic UI component, not the React module! typescript

Comments

@kasir-barati
Copy link

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/Linux
  • node -v: v19.7.0
  • npm -v: 9.5.0
  • pnpm -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.

image

@kasir-barati kasir-barati added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: docs-feedback Feedback from documentation page labels Apr 8, 2023
@zannager zannager added the component: snackbar This is the name of the generic UI component, not the React module! label Apr 10, 2023
@siriwatknp siriwatknp added typescript and removed support: docs-feedback Feedback from documentation page status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 14, 2023
@siriwatknp
Copy link
Member

Would be great if you can share a CodeSandbox so that we are on the same page.

@siriwatknp siriwatknp added the component: transitions This is the name of the generic UI component, not the React module! label Apr 14, 2023
@kasir-barati
Copy link
Author

Would be great if you can share a CodeSandbox so that we are on the same page.

TBH I do have a repo and I am not sure if it can help you: https://github.com/kasir-barati/open-ai-summaries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: snackbar This is the name of the generic UI component, not the React module! component: transitions This is the name of the generic UI component, not the React module! typescript
Projects
None yet
Development

No branches or pull requests

3 participants