diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-01-24 09:06:27 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-24 09:06:27 -0600 |
commit | 9027882fb401df2a9df6a89facb2bdb94b8b731b (patch) | |
tree | dc60ca1a2cc1be0838229f06b588f56871f2b91e /__mocks__ | |
parent | 439305b57e0c20799d87baf92c067ec8e262ea13 (diff) | |
download | voidsky-9027882fb401df2a9df6a89facb2bdb94b8b731b.tar.zst |
Account switcher (#85)
* Update the account-create and signin views to use the design system. Also: - Add borderDark to the theme - Start to an account selector in the signin flow * Dark mode fixes in signin ui * Track multiple active accounts and provide account-switching UI * Add test tooling for an in-memory pds * Add complete integration tests for login and the account switcher
Diffstat (limited to '__mocks__')
-rw-r--r-- | __mocks__/@gorhom/bottom-sheet.tsx | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/__mocks__/@gorhom/bottom-sheet.tsx b/__mocks__/@gorhom/bottom-sheet.tsx new file mode 100644 index 000000000..d6f907a34 --- /dev/null +++ b/__mocks__/@gorhom/bottom-sheet.tsx @@ -0,0 +1,57 @@ +import React from 'react' +import {View, ScrollView, Modal, FlatList, TextInput} from 'react-native' + +const BottomSheetModalContext = React.createContext(null) + +const BottomSheetModalProvider = (props: any) => { + return <BottomSheetModalContext.Provider {...props} value={{}} /> +} +class BottomSheet extends React.Component { + snapToIndex() {} + snapToPosition() {} + expand() {} + collapse() {} + close() { + this.props.onClose?.() + } + forceClose() {} + + render() { + return <View>{this.props.children}</View> + } +} +const BottomSheetModal = (props: any) => <Modal {...props} /> + +const BottomSheetBackdrop = (props: any) => <View {...props} /> +const BottomSheetHandle = (props: any) => <View {...props} /> +const BottomSheetFooter = (props: any) => <View {...props} /> +const BottomSheetScrollView = (props: any) => <ScrollView {...props} /> +const BottomSheetFlatList = (props: any) => <FlatList {...props} /> +const BottomSheetTextInput = (props: any) => <TextInput {...props} /> + +const useBottomSheet = jest.fn() +const useBottomSheetModal = jest.fn() +const useBottomSheetSpringConfigs = jest.fn() +const useBottomSheetTimingConfigs = jest.fn() +const useBottomSheetInternal = jest.fn() +const useBottomSheetDynamicSnapPoints = jest.fn() + +export {useBottomSheet} +export {useBottomSheetModal} +export {useBottomSheetSpringConfigs} +export {useBottomSheetTimingConfigs} +export {useBottomSheetInternal} +export {useBottomSheetDynamicSnapPoints} + +export { + BottomSheetModalProvider, + BottomSheetBackdrop, + BottomSheetHandle, + BottomSheetModal, + BottomSheetFooter, + BottomSheetScrollView, + BottomSheetFlatList, + BottomSheetTextInput, +} + +export default BottomSheet |