add commit
This commit is contained in:
parent
cad724f36a
commit
8cde82a3b4
|
@ -1,5 +1,6 @@
|
|||
import hoistNonReactStatics from 'hoist-non-react-statics';
|
||||
import React, { ForwardedRef, forwardRef, useContext, useRef, useState } from 'react';
|
||||
import { BottomSheetProps } from '@gorhom/bottom-sheet';
|
||||
|
||||
import { TIconsName } from '../CustomIcon';
|
||||
import ActionSheet from './ActionSheet';
|
||||
|
@ -53,7 +54,7 @@ export const ActionSheetProvider = React.memo(({ children }: { children: React.R
|
|||
const [actionSheetSnapIndex, setActionSheetSnapIndex] = useState(-1);
|
||||
const ref: ForwardedRef<IActionSheetProvider> = useRef(null);
|
||||
|
||||
const onChange = (index: number) => setActionSheetSnapIndex(index);
|
||||
const onChange: BottomSheetProps['onChange'] = index => setActionSheetSnapIndex(index);
|
||||
|
||||
const getContext = () => ({
|
||||
showActionSheet: (options: TActionSheetOptions) => {
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
const HEADER_HEIGHT = 48;
|
||||
/**
|
||||
* This SNAP_PERCENTAGE is calculate between the snaps: ['50%', '80%']
|
||||
* so considering the content size is set to 80% and the first snap is 50%
|
||||
* we need to 50% * 80% = 40%
|
||||
*/
|
||||
const SNAP_PERCENTAGE = 0.4;
|
||||
/**
|
||||
* This function is required for the ReactionsList to see the full list and the scroll enables,
|
||||
|
|
Loading…
Reference in New Issue