import './demo1.css';
import React from 'react';
import ReactDOM from 'react-dom';
import VirtualList from '..';
const dataSource = [];
const generateLi = (index) => {
    if (index % 3 === 0) {
        return (React.createElement("li", { key: `key-${index}`, style: { lineHeight: '30px', background: '#5f83ff', color: '#fff' } },
            "key-",
            index));
    }
    return (React.createElement("li", { key: `key-${index}`, style: { lineHeight: '20px' } },
        "key-",
        index));
};
for (let i = 0; i < 1000; i++) {
    dataSource.push(generateLi(i));
}
const demo = (React.createElement("div", { className: 'virtual-box' },
    React.createElement(VirtualList, null, dataSource)));
ReactDOM.render(demo, document.getElementById('virtual-list-demo-1'));
