From bfa9f7b9158faa3a453eaabf5be3c96b6c8a18b1 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 10 Oct 2020 13:39:08 +0300 Subject: refactor: remove demo components from lib --- src/demo/SmartList/SmartList.tsx | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/demo/SmartList/SmartList.tsx (limited to 'src/demo/SmartList/SmartList.tsx') diff --git a/src/demo/SmartList/SmartList.tsx b/src/demo/SmartList/SmartList.tsx new file mode 100644 index 0000000..c86c127 --- /dev/null +++ b/src/demo/SmartList/SmartList.tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import { FixedSizeList } from 'react-window'; +import AutoSizer from 'react-virtualized-auto-sizer'; + + +interface RenderPropTypes { + index: number; + style: React.CSSProperties; +} + +interface PropTypes { + itemSize: number; + itemCount: number; + renderItem: React.FC; +} + +interface Size { + height: number; + width: number; +} + + +const SmartList: React.FC = ({ itemSize, itemCount, renderItem }) => { + const ResizedList: React.FC = ({ width, height }) => ( + + {renderItem} + + ); + + return ( +
+ +
+ ); +}; + + +export default SmartList; -- cgit v1.2.3