import { Canvas, Meta, ArgTypes } from '@storybook/blocks';
import { ThemeProvider } from 'styled-components';
import Flex from '../../Flex';
import { lightTheme } from '../../../../theme/';
import { GlobalStyles } from '../../../../theme/GlobalStyles';
import InfiniteList from './';
import { BasicInfiniteList } from './InfiniteList.stories.tsx';
import * as InfiniteListStories from './InfiniteList.stories.tsx';
# InfiniteList
The InfiniteList component populates a list with elements. The list then handles loading more elements when the user scrolls to the top.
The InfiniteList initially scrolls the newest (bottom) item into view upon load. It also ensures the most recent new items is loaded into the top of the visible list and scrolling is disabled while loading the new batch.
## Importing
```javascript
import { InfiniteList } from 'amazon-chime-sdk-component-library-react';
```
## Example
```jsx
1, ...]}
handleLoad={fetchItems}
batchSize={50}
/>
```
## Props