"use strict";

require("./demo1.css");

var _react = _interopRequireDefault(require("react"));

var _reactDom = _interopRequireDefault(require("react-dom"));

var _ = _interopRequireDefault(require(".."));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var dataSource = [];

var generateLi = function generateLi(index) {
  if (index % 3 === 0) {
    return /*#__PURE__*/_react["default"].createElement("li", {
      key: "key-".concat(index),
      style: {
        lineHeight: '30px',
        background: '#5f83ff',
        color: '#fff'
      }
    }, "key-", index);
  }

  return /*#__PURE__*/_react["default"].createElement("li", {
    key: "key-".concat(index),
    style: {
      lineHeight: '20px'
    }
  }, "key-", index);
};

for (var i = 0; i < 1000; i++) {
  dataSource.push(generateLi(i));
}

var demo = /*#__PURE__*/_react["default"].createElement("div", {
  className: 'virtual-box'
}, /*#__PURE__*/_react["default"].createElement(_["default"], null, dataSource));

_reactDom["default"].render(demo, document.getElementById('virtual-list-demo-1'));