@rc-component/notification
v1.2.0
Published
notification ui component for react
Readme
@rc-component/notification
React Notification UI Component
Install
Usage
import Notification from '@rc-component/notification';
Notification.newInstance({}, (notification) => {
notification.notice({
content: 'content',
});
});Compatibility
| Browser | Supported Version |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
|
Firefox | last 2 versions |
|
Chrome | last 2 versions |
|
Safari | last 2 versions |
|
Electron | last 2 versions |
Example
http://localhost:8001
online example: https://notification-react-component.vercel.app
API
Notification.newInstance(props, (notification) => void) => void
props details:
notification.notice(props)
props details:
notification.removeNotice(key:string)
remove single notice with specified key
notification.destroy()
destroy current notification
Test Case
npm test
npm run chrome-testCoverage
npm run coverageopen coverage/ dir
License
@rc-component/notification is released under the MIT license.

