2.0.1 • Published 2 years ago
@lukana/alerts v2.0.1
Lukana alerts
Alerts.
Usage
- Add
@lukana/alerts/scss/alerts
to Yourstyle.scss
file or use Your own styles. - Import
AlertsModule
as dependency. Use somewhere in template
<lukana-alerts></lukana-alerts>
You can provide
[position]
attribute which is of type AlertsPosition. Default istop-right
To print alert use
AlertsService
with one of theseAlertsService.addSuccess('Success'); AlertsService.addError('Error', 0); AlertsService.addInfo('Info'); AlertsService.addWarning('Warning', 2000);
As second param You can provide
closeTime
in 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',
}