Loading lock component. Locks element while loading and adds spinner with component/spin.
$ component install cristiandouce/loading-lock
var loading = require('loading-lock');
Returns a LoadingLock
instance for given element with options.
Valid options are:
size
: Size (Number)diameter
of loading spinner.
var locker = loading(document.getElementById('example'), { size: 80 });
Locks element adding 'locked' class and spinner.
locker.lock();
Unlocks element removing 'locked' class and spinner.
locker.unlock();
MIT