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

Question: is there a way to hide the timer? #48

Closed raymond-ong closed 4 years ago

raymond-ong commented 4 years ago

Great library, but I find the timer (progress bar) distracting to the user so I want to hide it. I can manually hide the timer by adding my own CSS like so:

.notification-item .timer {
    visibility: hidden;
    margin-top: 0px !important;
}

If I set it to display:none, the notification never dismisses. Is there a props or something to hide the timer, so that i don't need to override the CSS?

teodosii commented 4 years ago

What were the options when creating the notification? The timer is being shown if dismiss.onScreen is set to true, which defaults to false.

teodosii commented 4 years ago

Until further clarifications I will have this ticket closed. If it's a bug we'll reopen it afterwards.

raymond-ong commented 4 years ago

Hi @teodosii !! Thanks for the reply. You can close it now. Yeah, this is just the onScreen prop! Stupid me :-)