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

[DRAFT] feat: configurable <MotionGroup> child element variants using :config-fn prop #193

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

BobbieGoede
Copy link
Collaborator

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSDoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This is built on #192.

This draft can be considered a feature proposal, its usefulness can be previewed in the updated docs with the following example of how easy a staggered animation would look like:

<MotionGroup preset="slideVisibleLeft" :config-fn="(index) => ({ delay: index * 200 })">
  <section>
    <h3>Product 1</h3>
    <p>Description text</p>
  </section>
  <section>
    <h3>Product 2</h3>
    <p>Description text</p>
  </section>
  <section>
    <h3>Product 3</h3>
    <p>Description text</p>
  </section>
</MotionGroup>

Not sure about the name of the prop, still need to add tests as well, feedback is appreciated!

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

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.

None yet

1 participant