djorg83 / react-bootstrap-sweetalert

A React implementation of SweetAlert
https://djorg83.github.io/react-bootstrap-sweetalert/
MIT License
252 stars 55 forks source link

Added custom show and hide animation #52

Closed wouter140 closed 5 years ago

wouter140 commented 5 years ago

Added support for custom show and hide animations with the openAnim and closeAnim properties. I also added an example in the demo page with a hide animation and I updated the readme documentation with these new properties.

This implements the feature request in issue #18.

To add a custom animation just pass an object with the name and duration properties in the open or close Anim property. In the name property, you specify the CSS animation-name and the duration is the animation duration in ms. If setting openAnim and/or closeAnim property to false, there will not be an animation.

Closes #18

djorg83 commented 5 years ago

@wouter140 would you mind resolving these conflicts? I merged your newer PRs first and this one has some implementation in functions that no longer exist.

wouter140 commented 5 years ago

The changes are not entirely correct. Am fixing the other stuff now in my branch. Will make a commit later tonight fixing all the last bits

djorg83 commented 5 years ago

Sure. No problem. I'm not publishing this until I have a chance to test everything and update the release notes.

wouter140 commented 5 years ago

Was not able to add the new changes in this pr as its closed, so I made a new pr #53 with the fixes

djorg83 commented 5 years ago

@wouter140 all of your added enhancements are now published in version 5.1.0. I had to spend some time debugging the open/close animations to make them work without needing to provide props.show. Now it works whenever you exit the alert without props.show needed. I also renamed props.customActions to props.customButtons. Thanks again for all of your contributions, you saved me a ton of time and effort.