import React from 'react'; import { FixedSizeList } from 'react-window'; import AutoSizer from 'react-virtualized-auto-sizer'; import { makeStyles } from '@material-ui/core'; const useStyles = makeStyles(theme => ({ root: { scrollbarColor: `${theme.palette.primary.dark} ${theme.palette.primary.light}`, } })); const SmartList = ({ itemSize, itemCount, renderItem }) => { const classes = useStyles(); return (
{({ width, height }) => ( {renderItem} )}
); }; export default SmartList;