scttcper / ngx-toastr

🍞 Angular Toastr
https://ngx-toastr.vercel.app
MIT License
2.52k stars 358 forks source link

Unable to modify Toast CSS #1012

Open shubham-bajaj opened 9 months ago

shubham-bajaj commented 9 months ago

const toastrConfig: Partial = { closeButton: true, progressBar: true, timeOut: 10000, toastClass: 'yourclass ngx-toastr' // toastClass: 'custom-toastr', // other configuration options... }; .yourclass.toast-error{ background-color: blue !important; } can you please explain me why this is not working? am i doing anything wrong?

adeniranjohn commented 7 months ago

Did you import the ToastModule.forRoot() with the toastConfig(toast configuration) to your AppModule or thereabout.

I just tested using your details with the latest version@18.0.0 and it works perfectly.