Creating a generic trigger mechanism
Description
In this PR I have address the following:
- Created a demo app that includes the SPM package to showcase its behaviour
- Added app assets to the demo app
- Changed documentation accordingly
- Changed the trigger mechanism to consider other types and not only Integers as before
Related Issues
Issue #36
Checklist
- [x] Have you added tests where necessary? Do all the test pass?
- [x] Have you added descriptive comments to your code?
- [x] Have you updated the documentation related to this proposal
@simibac let me know what you think 🙏
Thanks for your contribution. This PR contains too many changes. Maybe breaking it into smaller chunks can help the owner to merge it easier.
Suggestion:
- A PR for making the trigger generic (including rename the property and updates for the docs accordingly)
- A PR for adding a demonstration of these changes (including the app and the needed assets)
You should create the Example app inside a folder named Example, the way you added an additional folder level will cause SPM to not find the package in the project, but the change is good.
I like the idea of having a generic data type to trigger the animation. However, as @OmarJalil pointed out, we cannot merge this PR due to the folder structure. I would like to keep this repo as clean as possible and use the demo app repo for showcasing the functionality: https://github.com/simibac/ConfettiSwiftUIDemo
Replacing counter with trigger will break everybody. If we want to add the generic type: counter should remain as a parameter but can be labelled as deprecated.
This has been included in v2.0.1 thanks to @OmarJalil