rsuite
rsuite copied to clipboard
Do not close the notification while the mouse is over it.
What problem does this feature solve?
Do not close the notification while the mouse is over the element. something similar to what the pNotify library does.
https://sciactive.com/pnotify/
PNotify.notice({
title: 'No Mouse Reset Notice',
text: 'I don\'t care if you move your mouse over me, I\'ll disappear when I want.',
mouseReset: false
});
they handle it as Mouse Reset, this is useful for notifications that you want to last a short time, but maybe, the user is interested in reading them and they have a lot of text, so while the mouse is over it, the notification will not disappear.
What does the proposed API look like?
interface NotificationProps {
title: React.ReactNode;
description: React.ReactNode;
duration?: number;
placement?: string;
className?: string;
style?: React.CSSProperties;
top?: number;
bottom?: number;
key?: string;
onClose?: () => void;
mouseReset?: boolean;
}
Notification.open({
title: 'Notify',
duration: 5000,
description: <Paragraph style={{ width: 320 }} rows={35} />
mouseReset: true
});
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.