0.1.0 • Published 7 years ago
@mapbox/page-loading-indicator v0.1.0
@mapbox/page-loading-indicator
A page loading indicator you can swipe across the top of the screen while things load.
⚠️ This is not a React component!
⚠️ This must be used in combination with mapbox-assembly v0.20.0+, which includes the necessary CSS.
Installation
npm install @mapbox/page-loading-indicator
API
start
pageLoadingIndictor.start()
Adds the indicator to the DOM and slides it into view.
end
pageLoadingIndictor.end(): Promise<void>
Slides the indicator out of view and removes it from the DOM. Returns a Promise that resolves when the indicator has been destroyed.
This will only happen after enough delay for the start
animations to complete.
So the indicator should always appear for a minimum of about half a second.
0.1.0
7 years ago