From 9027882fb401df2a9df6a89facb2bdb94b8b731b Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 24 Jan 2023 09:06:27 -0600 Subject: 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 --- __mocks__/@gorhom/bottom-sheet.tsx | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 __mocks__/@gorhom/bottom-sheet.tsx (limited to '__mocks__') 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 +} +class BottomSheet extends React.Component { + snapToIndex() {} + snapToPosition() {} + expand() {} + collapse() {} + close() { + this.props.onClose?.() + } + forceClose() {} + + render() { + return {this.props.children} + } +} +const BottomSheetModal = (props: any) => + +const BottomSheetBackdrop = (props: any) => +const BottomSheetHandle = (props: any) => +const BottomSheetFooter = (props: any) => +const BottomSheetScrollView = (props: any) => +const BottomSheetFlatList = (props: any) => +const BottomSheetTextInput = (props: any) => + +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 -- cgit 1.4.1