Yesterday morning I was playing a bit with some personal project, and found myself having to add a simple loader. Nothing complicated, but I just wanted to do it a different way.
Could I create a package that I could reuse after? Sure.
Got an idea how I could do it, so just opened StackBlitz and started playing with it. It was working fine, and was doing what it's supposed to do.
Why not? It was fun to make, and I could use it anytime I want to.
It's pretty simple. You initialize a loader, and send id of element where you want it to be displayed and type of loader as parameters.
let loader = new Loader('app', 'standard'); // show loader loader.show(); // hide loader loader.hide();
Currently, there are 4 different loaders, but I will probably add more.
You can check it out at github repo.
Nothing complex or new, but it was fun to make and play with it.