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

Customize toast #88

Open
jacksonsophat opened this issue Mar 23, 2023 · 3 comments
Open

Customize toast #88

jacksonsophat opened this issue Mar 23, 2023 · 3 comments

Comments

@jacksonsophat
Copy link

This isn't an issue, just a question.

How can I customize a toast globally? For example, change the background color that can work across the app?

Thank you!

@ardeora
Copy link
Owner

ardeora commented Mar 23, 2023

Hello! https://github.com/ardeora/solid-toast#available-options-1 Does this help? You can set background color of the toast globally on the <Toaster /> component. Or do you mean when using toast.custom()?

@jacksonsophat
Copy link
Author

I don't think that would work the way I want it. I want to have border red for error and green for success globally.
Hope I make sense.

@gxanshu
Copy link

gxanshu commented Aug 4, 2023

as i noticed by inspecting the the documentation site i realized that you can get your desirable result with global CSS customization here is a example bellow.

i noticed that the div of toast uses the sldt-active class so we can selected toast with following code.

/** just a example **/
.sldt-active > div {
  border-color: red;
  border-width: 2px;
}

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

3 participants