-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScrollView.tsx
More file actions
executable file
·43 lines (37 loc) · 1.06 KB
/
ScrollView.tsx
File metadata and controls
executable file
·43 lines (37 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import React from 'react'
import { ScrollView as BaseScrollView, ScrollViewProps } from 'react-native'
import type { Params } from '../types'
import { useSmartScroll } from '../useSmartScroll'
import { listFactory } from './FactoryList'
interface Props extends ScrollViewProps, Params {
readonly children: React.ReactNode
}
// export const ScrollView = ({
// children,
// scrollEnabled,
// onLayout,
// onContentSizeChange,
// horizontal,
// onSmartScrollStatusChange,
// ...props
// }: Props) => {
// const { handleContentSizeChange, handleLayout, isScrollEnabled } =
// useSmartScroll({
// horizontal,
// onSmartScrollStatusChange,
// onLayout,
// onContentSizeChange,
// })
// return (
// <BaseScrollView
// {...props}
// horizontal={horizontal}
// scrollEnabled={isScrollEnabled}
// onLayout={handleLayout}
// onContentSizeChange={handleContentSizeChange}
// >
// {children}
// </BaseScrollView>
// )
// }
export const ScrollView = listFactory<ScrollViewProps>(BaseScrollView)