Author: | MinimalistYing |
---|---|
Views Total: | 2,209 views |
Official Page: | Go to website |
Last Update: | February 15, 2019 |
License: | MIT |
Preview:

Description:
A vanilla JavaScript notification library used to create info, success, error, and warning toast messages inspired by Ant Design.
How to use it:
Install the vanilla-antd-message module.
# NPM $ npm install vanilla-antd-message --save
Import the vanilla-antd-message.
import message from 'vanilla-antd-message' import 'vanilla-antd-message/dist/style.css'
Create a new Message instance.
const message = new Message();
Create toast messages with the following syntax.
message.info('Info Message', duration, onClose); message.success('Success Message', duration, onClose); message.error('Error Message', duration, onClose); message.warn('Warn Message', duration, onClose);
Change the default duration in milliseconds.
Message.prototype.duration = 3000
Changelog:
02/15/2019
- v1.1.0
01/12/2019
- add onClose callback