mzohaibqc / svelte-toasts

A highly configurable notification/toast component with individual toast state management capabilities.
https://mzohaibqc.github.io/svelte-toasts/
MIT License
42 stars 6 forks source link

Property 'toasts' does not exist on type 'IntrinsicAttributes & ToastContainerProps'. #1

Closed www-chique closed 3 years ago

www-chique commented 3 years ago

I am really a fan of this package and trying to use it in my application. However, I get this typescript error.

image

If I ignore, it just works fine. But it would be great to also not have this error message. Also getting the same error at "width" property. image

Am I doing something wrong? Many thanks and I appreciate your work.

mzohaibqc commented 3 years ago

@www-chique Thanks for your kind words.

That's my mistake, ToastContainer does not take toasts prop as store. It is importting toasts from store inside that component so no need to add that prop. I've updated the docs on website.

width type was 'string' which was incorrect so fixed it. now it is string so it will work.

You can update npm package to svelte-toasts@1.1.2 and everything will be good.