@commercetools-uikit/loading-spinner
Version: 
A spinner animation to indicate loading state (e.g pending requests) for the user.
47 lines (31 loc) • 1.72 kB
Markdown
<!-- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -->
<!-- This file is created by the `yarn generate-readme` script. -->
# LoadingSpinner
## Description
A spinner animation to indicate loading state (e.g pending requests) for the user.
## Installation
```
yarn add @commercetools-uikit/loading-spinner
```
```
npm --save install @commercetools-uikit/loading-spinner
```
Additionally install the peer dependencies (if not present)
```
yarn add react
```
```
npm --save install react
```
## Usage
```jsx
import LoadingSpinner from '@commercetools-uikit/loading-spinner';
const Example = () => <LoadingSpinner size="s">Loading</LoadingSpinner>;
export default Example;
```
## Properties
| Props              | Type                                         | Required | Default | Description                                                                                                |
| ------------------ | -------------------------------------------- | :------: | ------- | ---------------------------------------------------------------------------------------------------------- |
| `maxDelayDuration` | `number`                                     |          | `1000`  | Set the amount of time to delay the loading spinner before it renders.
The default value of is 1000ms. |
| `scale`            | `union`<br/>Possible values:<br/>`'s' , 'l'` |          | `'l'`   | Set the size of the loading spinner.                                                                       |
| `children`         | `ReactNode`                                  |          |         | The content rendered inside the `LoadingSpinner`.                                                          |