add commit

This commit is contained in:
Reinaldo Neto 2023-02-07 15:05:18 -03:00
parent cad724f36a
commit 8cde82a3b4
2 changed files with 7 additions and 1 deletions

View File

@ -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) => {

View File

@ -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,