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

[BUG] - toastProps classNames are not working as expected. #4873

Closed
IsraelDCastro opened this issue Feb 20, 2025 · 3 comments
Closed

[BUG] - toastProps classNames are not working as expected. #4873

IsraelDCastro opened this issue Feb 20, 2025 · 3 comments

Comments

@IsraelDCastro
Copy link

HeroUI Version

2.7.2

Describe the bug

When I try to set global CSS classes using toastProps in component is not working as should be.

<ToastProvider  toastProps={{ classNames: { title: "text-lg bg-red-500", base: "bg-green-700" }}} />

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Just try to set global CSS classes in:

<ToastProvider  toastProps={{ classNames: { title: "text-lg flex-col bg-red-500", base: "bg-green-700" }}} />

Expected behavior

I expected when I set global CSS classes to work as docs says.

Screenshots or Videos

Image Image

Operating System Version

macOS

Browser

Chrome

Copy link

linear bot commented Feb 20, 2025

@macci001
Copy link
Contributor

Hey @IsraelDCastro,

Sorry for the delayed response.

I tried to reproduce this issue this issue, but seems like it works well on my end. You can check my trial here: https://codesandbox.io/p/devbox/competent-pine-fg84pq . Some folks had issues with toast which were resolved on cleaning up their node_modules and .next(if using nextJs). Maybe you can try this out once.

If the issue persists, please do let us know. We will be happy to help.

@IsraelDCastro
Copy link
Author

Hello @macci001, cleaning node_modules worked for me. Thank you.

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

No branches or pull requests

3 participants