import { Canvas, Meta, ArgTypes } from '@storybook/blocks';
import { ThemeProvider } from 'styled-components';

import Spinner from './';
import { lightTheme } from '../../../../theme/';
import { GlobalStyles } from '../../../../theme/GlobalStyles';
import * as SpinnerStories from './Spinner.stories.tsx';

<Meta of={SpinnerStories} />

# Spinner Icon

The Spinner component creates a spinner icon using inline SVG. Typically, you can use it to indicate loading or fetching.

## Importing

```javascript
import { Spinner } from 'amazon-chime-sdk-component-library-react';
```

## Example

With custom width and height

<ThemeProvider theme={lightTheme}>
  <GlobalStyles />
  <Canvas>
    <Spinner width="2rem" height="2rem" />
  </Canvas>
</ThemeProvider>

```jsx
<Spinner width="2rem" height="2rem" />
```

## Props

<ArgTypes of={Spinner} />
