@getfly-ui/notification
v0.0.9
Published
Notification for getfly UI
Downloads
36
Maintainers
Readme
Notification component
How to use
import { hideAllNotification, Notification, showNotification } from '@getfly-ui/notification';OR
import { hideAllNotification, Notification, showNotification } from 'getfly-ui';
// other code
// function show notification
const handleAddNotify = () => showNotification({
data: { text: '...', type: 'success' },
onClick: () => {
// handle onClick notification item
}
});
// function hide all notification
const handleHideAllNotification = () => hideAllNotification();
// inject component into render function or App.tsx
...
<Notification />
...