my fork of the bluesky client
1import React, {ReactNode} from 'react'
2import {View, ScrollView, Modal, FlatList, TextInput} from 'react-native'
3
4const BottomSheetModalContext = React.createContext(null)
5
6const BottomSheetModalProvider = (props: any) => {
7 return <BottomSheetModalContext.Provider {...props} value={{}} />
8}
9class BottomSheet extends React.Component<{
10 onClose?: () => void
11 children?: ReactNode
12}> {
13 snapToIndex() {}
14 snapToPosition() {}
15 expand() {}
16 collapse() {}
17 close() {
18 this.props.onClose?.()
19 }
20 forceClose() {}
21
22 render() {
23 return <View>{this.props.children}</View>
24 }
25}
26const BottomSheetModal = (props: any) => <Modal {...props} />
27
28const BottomSheetBackdrop = (props: any) => <View {...props} />
29const BottomSheetHandle = (props: any) => <View {...props} />
30const BottomSheetFooter = (props: any) => <View {...props} />
31const BottomSheetScrollView = (props: any) => <ScrollView {...props} />
32const BottomSheetFlatList = (props: any) => <FlatList {...props} />
33const BottomSheetTextInput = (props: any) => <TextInput {...props} />
34
35const useBottomSheet = jest.fn()
36const useBottomSheetModal = jest.fn()
37const useBottomSheetSpringConfigs = jest.fn()
38const useBottomSheetTimingConfigs = jest.fn()
39const useBottomSheetInternal = jest.fn()
40const useBottomSheetDynamicSnapPoints = jest.fn()
41
42export {useBottomSheet}
43export {useBottomSheetModal}
44export {useBottomSheetSpringConfigs}
45export {useBottomSheetTimingConfigs}
46export {useBottomSheetInternal}
47export {useBottomSheetDynamicSnapPoints}
48
49export {
50 BottomSheetModalProvider,
51 BottomSheetBackdrop,
52 BottomSheetHandle,
53 BottomSheetModal,
54 BottomSheetFooter,
55 BottomSheetScrollView,
56 BottomSheetFlatList,
57 BottomSheetTextInput,
58}
59
60export default BottomSheet