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

export ToasterProps type #400

Merged
merged 2 commits into from May 23, 2024
Merged

Conversation

Sam-Apostel
Copy link
Contributor

For Sonner to be bundled in other libraries, we need to export ToasterProps.

This fixes following error for library authors:

TS4023: Exported variable 'X' has or is using name 'ToasterProps' from external module './node_modules/sonner/dist/index' but cannot be named

Issue:

Closes #399

What has been done:

  • exported ToasterProps from index

For Sonner to be bundled in other libraries, we need to export `ToasterProps`.

This fixes following error for library authors:
```
TS4023: Exported variable 'X' has or is using name 'ToasterProps' from external module './node_modules/sonner/dist/index' but cannot be named
```
Copy link

vercel bot commented Apr 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sonner ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2024 8:35am

@omridevk
Copy link

@Sam-Apostel
Can you also export all from here:
https://github.com/emilkowalski/sonner/blob/main/src/types.ts

I am getting a similar issue just with:

Exported variable 'toast' has or is using name 'ToastClassnames' from external module "/node_modules/sonner/dist/index" but cannot be named.

@hailwood
Copy link

I was just coming to the repo to ask for this.
For me it's ToastIcons that I was after.

@basickarl
Copy link

This should probably get merged.

@emilkowalski emilkowalski merged commit 35610be into emilkowalski:main May 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants