teodosii / react-notifications-component

Delightful and highly customisable React Component to notify your users
https://teodosii.github.io/react-notifications-component/
MIT License
1.27k stars 73 forks source link

Custom Notification UI #39

Closed akhilpanchal closed 4 years ago

akhilpanchal commented 4 years ago

Hi: I am investigating this library for my use-case. I have a React component that represents the UI for the notification along with the animations while mounting and unmounting. Is there a way I can render my component as a notification using the existing API?

teodosii commented 4 years ago

I'll tell you if you answer honestly - have you even checked the README? :laughing:

Now if you had spent at least 1 minute skimming the README you'd have noticed that we support custom content usage - meaning you render anything you want. Now in terms of mounting and unmount animations, it depends.

If it's CSS animation, it will work, you just need to provide the classes. If it's JS (e.g. animations based on requestAnimationFrame) it might work or not, haven't tried and I can't tell for sure. You would add some tweaking/handling and I tend to think it will work but considering I have never done it before, I can't tell exactly.

akhilpanchal commented 4 years ago

Hey I apologize! I guess I directly jumped across to look at example code of custom UI and missed the feature list at the very top. I shouldn't have hurried. My bad.