@@ -2,8 +2,8 @@ import { action, makeAutoObservable } from 'mobx';
2
2
import { Keyboard , ViewStyle } from 'react-native' ;
3
3
import { AnimatedStyle , SharedValue } from 'react-native-reanimated' ;
4
4
import metrics from '../constants/metrics' ;
5
- import { useStores } from './useStores' ;
6
- import { BOTTOM_SHEET_POPUP_ANIMATION_TIME } from '../components/common/BottomSheet' ;
5
+
6
+ export const BOTTOM_SHEET_POPUP_ANIMATION_TIME = 250 ;
7
7
8
8
const DEFAULT_BOTTOM_SHEET_SNAP_POINTS = [ 1 , 300 + metrics . safeBottomDistance ] ;
9
9
interface OpenBottomSheetOps {
@@ -39,8 +39,7 @@ class UiClass {
39
39
40
40
bottomSheetSharedValue : UiStore [ 'bottomSheetSharedValue' ] = undefined ;
41
41
42
- bottomSheetSnapPoints : UiStore [ 'bottomSheetSnapPoints' ] =
43
- DEFAULT_BOTTOM_SHEET_SNAP_POINTS ;
42
+ bottomSheetSnapPoints : UiStore [ 'bottomSheetSnapPoints' ] = DEFAULT_BOTTOM_SHEET_SNAP_POINTS ;
44
43
containerStyle : UiStore [ 'containerStyle' ] = { } ;
45
44
bottomSheetGorhomProps : UiStore [ 'bottomSheetGorhomProps' ] = { } ;
46
45
bottomSheetStyle : OpenBottomSheetOps [ 'bottomSheetStyle' ] = undefined ;
@@ -53,10 +52,11 @@ class UiClass {
53
52
54
53
bottomSheetTargetSharedValue : UiStore [ 'bottomSheetTargetSharedValue' ] = 0 ;
55
54
56
- setBottomSheetTargetSharedValue : UiStore [ 'setBottomSheetTargetSharedValue' ] =
57
- action ( ( targetSharedValue ) => {
55
+ setBottomSheetTargetSharedValue : UiStore [ 'setBottomSheetTargetSharedValue' ] = action (
56
+ ( targetSharedValue ) => {
58
57
this . bottomSheetTargetSharedValue = targetSharedValue ;
59
- } ) ;
58
+ } ,
59
+ ) ;
60
60
61
61
openBottomSheet : UiStore [ 'openBottomSheet' ] = action ( ( options ) => {
62
62
if ( ! this . isBottomSheetOpen && ! this . bottomSheetDebouncedDelay ) {
@@ -108,8 +108,4 @@ class UiClass {
108
108
}
109
109
}
110
110
111
- export function useUiStore ( ) {
112
- return useStores ( ) . ui ;
113
- }
114
-
115
111
export default UiClass ;
0 commit comments