Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): extend gesture handler #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TacticCoder
Copy link

No description provided.

@TacticCoder
Copy link
Author

@tarasvakulka Can you please checkout the changes ?

Comment on lines +1 to +3
import CardWrap from '../CardWrap';
import SwipePan, { SWIPE_DIRECTION } from '../SwipePan';
import styles from './styles';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, do not change order of imports. Keep the next order: library, own components, other stuff.

@@ -275,12 +278,14 @@ const CardsSwipe = forwardRef(
cardContainerStyle,
}}
>
{renderCard(cards[secondIndex])}
{renderCard(cards[secondIndex], index)}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be in this case you should pass secondIndex instead index ? It would be the right, if you need index of card that render

Comment on lines +28 to +32
onStart: (event: GestureHandleEvent) => void;
onEnd: (event: GestureHandleEvent) => void;
onChangeDirection: (direction: SWIPE_DIRECTION) => void;
children: React.ReactNode;
onDragAround: (event: GestureHandleEvent) => void;
onFinish: (event: GestureHandleEvent) => void;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, update documentation with all these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants