DefinitelyTyped/types/react-infinite-scroll-component/react-infinite-scroll-component-tests.tsx
2018-06-05 16:09:50 -04:00

17 lines
388 B
TypeScript

import * as React from 'react';
import * as InfiniteScroll from 'react-infinite-scroll-component';
const options: JSX.Element[] = [
<div key='1'>1</div>,
<div key='2'>2</div>,
];
const props: InfiniteScroll.InfiniteScrollProps = {
dataLength: 4,
hasMore: true,
endMessage: 'The end.',
next: () => null,
};
<InfiniteScroll {...props}>{options}</InfiniteScroll>;