import React from "react";
import { Virtuoso } from "react-virtuoso";

export interface ListProps {
  children: React.ReactNode;
  total: number;
  style: { height: string };
}

/**
 * This is the `<List>` component <br />
 * Use this to render large data sets (virtualized)
 */
const List: React.FC<ListProps> = (props) => {
  const { children, total } = props;
  return (
    <Virtuoso {...props} totalCount={total} itemContent={() => children} />
  );
};

export default List;
