forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1import {forwardRef, memo} from 'react'
2import {type FlatListComponent, View, type ViewProps} from 'react-native'
3import Animated from 'react-native-reanimated'
4import {type FlatListPropsWithLayout} from 'react-native-reanimated'
5
6// If you explode these into functions, don't forget to forwardRef!
7
8/**
9 * Avoid using `FlatList_INTERNAL` and use `List` where possible.
10 * The types are a bit wrong on `FlatList_INTERNAL`
11 */
12export const FlatList_INTERNAL = memo(Animated.FlatList)
13export type FlatList_INTERNAL<ItemT = any> = Omit<
14 FlatListComponent<ItemT, FlatListPropsWithLayout<ItemT>>,
15 'CellRendererComponent'
16>
17
18/**
19 * @deprecated use `Layout` components
20 */
21export const ScrollView = Animated.ScrollView
22export type ScrollView = typeof Animated.ScrollView
23
24/**
25 * @deprecated use `Layout` components
26 */
27export const CenteredView = forwardRef<
28 View,
29 React.PropsWithChildren<
30 ViewProps & {sideBorders?: boolean; topBorder?: boolean}
31 >
32>(function CenteredView(props, ref) {
33 return <View ref={ref} {...props} />
34})