How can we edit the appearance of the NSB.Snackbar ?
Also how can we change the setTimeout function which controls how long the Snackbar is shown for ?
An example of the dismiss timeout could be like: NSB.Snackbar("leftText","rightText",duration);
I want to change the css style i.e. add rounded borders, change the opacity, change the background color, change the text color, change the position and also reduce the amount of time it is shown for.
Here’s how to change the background color of a Snackbar:
NSB.Snackbar("This is a warning about something.", "more?", snackBarDismiss)
element = document.querySelector('.paper-snackbar');
element.style.backgroundColor = 'red';
Changing the duration will require a new build of AppStudio.
I’m not sure your approach to showing and dismissing the Snackbar will work. It would be much better if AppStudio took care of this for you. It should be in the next build, but that will be at least a few days.
If adding that CSS to the Project CSS does the job, great. That’s what Project CSS is for!