import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
import * as Stories from './examples';

<Meta title="Components|ActivityIndicator" />

# ActivityIndicator

Displays a customizable activity indicator.

## Props

| Name                      | Type      | Default |
| ------------------------- | --------- | ------- |
| ...ViewProps              | | |
| animating                 | ?boolean  | true |
| color                     | ?string   | '#1976D2' |
| hidesWhenStopped          | ?boolean  | true |
| size                      | 'small' \| 'large' \| number | 'small' |

### animating

Controls whether to show the indicator or hide it.

<Preview withSource='none'>
  <Story name="animating">
    <Stories.animating />
  </Story>
</Preview>

### color

Customize the foreground color of the indicator.

<Preview withSource='none'>
  <Story name="color">
    <Stories.color />
  </Story>
</Preview>

### hidesWhenStopped

Control whether to show the indicator when it is not animating.

<Preview withSource='none'>
  <Story name="hidesWhenStopped">
    <Stories.hidesWhenStopped />
  </Story>
</Preview>

### size

Customize the size of the indicator. `small` has a height of `20px`, large has a
height of `36px`. Scale transforms can also be used.

<Preview withSource='none'>
  <Story name="size">
    <Stories.size />
  </Story>
</Preview>
