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

Custom loadingIcon inherits toast classes even though it is rendered inside one #267

Closed
samlaycock opened this issue Dec 25, 2023 · 1 comment

Comments

@samlaycock
Copy link

Looking at the code, I'm not sure if this is intentional or not..?:

className={cn('loader', classNames?.toast, toast?.classNames?.toast)}

It means that the custom loadingIcon is rendered with the toast's classes, which causes a double rendering of styles (background, shadows etc.). I think it would be better if the loadingIcon prop was completely agnostic to any other external styles, as you've already opted into rendering the loading component yourself entirely anyway?

Example:

Screenshot 2023-12-25 at 10 18 33
@emilkowalski
Copy link
Owner

Good catch, fixed in #268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants