juliancwirko / react-s-alert

Alerts / Notifications for React with rich configuration options
https://www.npmjs.com/package/react-s-alert
MIT License
649 stars 75 forks source link

Close alert animation #22

Closed vugman closed 7 years ago

vugman commented 8 years ago

Is it possible to do Alert.close(:id) or Alert.closeAll() animated?

Thanks

juliancwirko commented 8 years ago

Hi, some of them should have a closing animation, but not all of them, some of them has just 'fade out' effect. This is because it was difficult to manage timings in complicated animations and some other problematic stuff. But it probably could be implemented better.

vugman commented 8 years ago

Hey,

Thanks for the quick response. I'm using a custom component for the alert (based on the original implementation). When i click on the alert i call this.props.handleClose() and then I see the animation. Yet, when I call Alert.closeAll() from outside of the component, there's no animation.

Is there a way I can get it to animate currently also when calling Alert.closeAll() ?

juliancwirko commented 8 years ago

Yes, the closeAll method just removes all alerts from the store. We could probably improve that, but for now there isn't a simple way to achieve it.

vugman commented 8 years ago

Ok, thanks.

Great work btw!