LoadingContainer
import { LoadingContainer } from '@enmovil/ui-design-system';
Provides an app-wide loading indicator. Wrap your app in LoadingContainer, then call useLoader().showLoader() and hideLoader() from any component inside it.
Properties
| Property | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
defaultLoaderProps | Partial<LoaderProps> | No | {} | — | Default settings for the loader, such as size (sm, md or lg), variant, text and fullScreen. Without it the loader is medium-sized and full-screen; options passed to showLoader() are merged over these and kept for later calls. |
size | string | No | — | 'small', 'middle', 'large' | Not a prop of LoadingContainer; it is only a story control and has no effect. Set the loader size with defaultLoaderProps.size (sm, md or lg). |
color | string | No | — | 'primary', 'secondary', 'white' | Not a prop of LoadingContainer; it is only a story control and has no effect. Set the loader colour with defaultLoaderProps.variant (default, primary or secondary). |
isFullscreen | boolean | No | — | — | Not a prop of LoadingContainer; it is only a story control and has no effect. Use defaultLoaderProps.fullScreen (on by default) instead. |
Events
This component has no events.
Children
LoadingContainer does not accept children.
Variants
Loading examples…
Playground
Change the controls to see how the properties affect the component. Values the controls don't cover come from the Loader example.
Loading playground…
Storybook
Open LoadingContainer in Storybook to try every story with the full set of controls.