Package Exports
- @lukana/alerts
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lukana/alerts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Lukana alerts
Alerts.
Usage
Add
@lukana/alerts/scss/alertsto Yourstyle.scssfile or use Your own styles.Import
AlertsModuleas dependency.Use somewhere in template
<lukana-alerts></lukana-alerts>
You can provide
[position]attribute which is of type AlertsPosition. Default istop-rightTo print alert use
AlertsServicewith one of theseAlertsService.addSuccess('Success'); AlertsService.addError('Error', 0); AlertsService.addInfo('Info'); AlertsService.addWarning('Warning', 2000);
As second param You can provide
closeTimein miliseconds - default: 4000. If You give 0 it won't be closed automagically.
Positions
export enum AlertsPosition {
TopRight = 'top-right',
BottomRight = 'bottom-right',
BottomLeft = 'bottom-left',
TopLeft = 'top-left',
TopFullWidth = 'top-full-width',
BottomFullWidth = 'bottom-full-width',
}