-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
TypeScript error when trying to use SnackbarContent component #311
Comments
I have the same issue. |
Could you make some working domo to reproduce this issue? This code works for me.
|
Fixed in #319 . Fix will be published soon. |
I'm still experiencing this using "notistack": "^1.0.2". import { useSnackbar, SnackbarContent } from 'notistack'; --> Module '"../../../../../node_modules/notistack/dist"' has no exported member 'SnackbarContent'. |
Looks like it's not fixed. I'm using ^1.0.3. full page of node_modules/notistack/dist/index.d.ts is below
|
I'm not able to use SnackbarContent with typescript. I think there is no SnackbarContent exported from index.d.ts as @Musashi-Sakamoto stated. |
Same here,
|
I am trying to follow the custom snackbar example in the docs: https://iamhosseindhv.com/notistack/demos#custom-snackbar.
When I try and use the
SnackbarContent
component that is exposed by notistack, I get the following error in TypeScript:'SnackbarContent' only refers to a type, but is being used as a value here.
Expected Behavior
SnackbarContent should of type JSX.Element
Current Behavior
Gives the TypeScript error: 'SnackbarContent' only refers to a type, but is being used as a value here.
Context
Trying to create a custom snackbar by using
SnackbarContent
as the root component (like in the example in the docs).Your Environment
The text was updated successfully, but these errors were encountered: