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: add enabled prop in StaggerProps #2

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

OsamaAburabie
Copy link

Description:
This pull request introduces a valuable enhancement to the Stagger component. We have added a new enabled prop, which allows users to control the behavior of staggered animations. When enabled is set to true, the staggered animations will be applied as usual. However, when set to false, the animations will be disabled, and all child components will be rendered without any animation.

Motivation:
The addition of the enabled prop provides greater flexibility and control to developers using the Stagger component. It allows them to easily toggle the staggered animations on and off based on their specific application requirements. This feature can be particularly useful in scenarios where dynamic animation control is needed, enhancing the overall user experience.

Usage:
To disable staggered animations and render child components without animations, simply set the enabled prop to false when using the Stagger component.

<Stagger enabled={false}>
  {/* Child components */}
</Stagger>

By default, enabled is set to true, ensuring that the existing behavior of staggered animations remains unchanged.

@OsamaAburabie OsamaAburabie changed the title Enabled prop feat: add enabled prop in StaggerProps Sep 25, 2023
@OsamaAburabie
Copy link
Author

@catalinmiron Hi I would love if you review this pr and thanks for the awesome lib btw.

@catalinmiron
Copy link
Member

Thanks @OsamaAburabie for your contribution!

@catalinmiron catalinmiron merged commit 83ae6ba into animate-react-native:main Feb 12, 2024
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