Riot.js custom tag that shows bootstrap v4 alpha alerts.
https://alhugone.github.io/riot-bootstrap4-alert/
Place <alerts> tag:
<alerts name="alerts"></alerts>
Add alert in JavaScript:
this.tags.alerts.addAlert(
{ type: 'success',
msg: 'This is message',
hideAfter: 0,
fadeOutTime: 1000,
dismissible: true }
);
Each alert can be customized with:
- success/info/warn/error type
- stay for ever or close after specified seconds
- dissmissable/non-dissmisable
- fadeOut custom time or 'slow'(jQuery) default
npm install
npm test