aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-10-10 13:40:16 +0300
committereug-vs <eug-vs@keemail.me>2020-10-10 13:40:16 +0300
commit59787b22e6f27a8c1714a195d1124752de4531a6 (patch)
tree5ce0bea66256a337e52981e0c2482f44ef51fbd7
parentbfa9f7b9158faa3a453eaabf5be3c96b6c8a18b1 (diff)
downloadreact-benzin-59787b22e6f27a8c1714a195d1124752de4531a6.tar.gz
feat!: remove SmartList component
-rw-r--r--src/demo/SmartList/SmartList.tsx43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/demo/SmartList/SmartList.tsx b/src/demo/SmartList/SmartList.tsx
deleted file mode 100644
index c86c127..0000000
--- a/src/demo/SmartList/SmartList.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-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<RenderPropTypes>;
-}
-
-interface Size {
- height: number;
- width: number;
-}
-
-
-const SmartList: React.FC<PropTypes> = ({ itemSize, itemCount, renderItem }) => {
- const ResizedList: React.FC<Size> = ({ width, height }) => (
- <FixedSizeList
- height={height}
- width={width}
- itemSize={itemSize}
- itemCount={itemCount}
- >
- {renderItem}
- </FixedSizeList>
- );
-
- return (
- <div style={{ flex: '1 1 auto', overflow: 'hidden' }}>
- <AutoSizer children={ResizedList} />
- </div>
- );
-};
-
-
-export default SmartList;