Files
bsky-social-app/src/view/com/pager/DraggableScrollView.tsx
T
dan a22685c345 Sort imports (#6009)
* Mark import sort/order/style rules as error

* npm run lint -- --fix
2024-10-29 23:02:48 +00:00

17 lines
480 B
TypeScript

import React, {ComponentProps} from 'react'
import {ScrollView} from 'react-native'
import {useDraggableScroll} from '#/lib/hooks/useDraggableScrollView'
export const DraggableScrollView = React.forwardRef<
ScrollView,
ComponentProps<typeof ScrollView>
>(function DraggableScrollView(props, ref) {
const {refs} = useDraggableScroll<ScrollView>({
outerRef: ref,
cursor: 'grab', // optional, default
})
return <ScrollView ref={refs} horizontal {...props} />
})