diff --git a/README.md b/README.md index c653399..6693999 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ imports: [ ## Usage ``` - + ``` * **message**: is a two bounded attribute which takes in `IMessage` ```typescript @@ -60,13 +60,19 @@ imports: [ ``` `type` can be `MessageType.info`, `MessageType.success`, `MessageType.error` or `MessageType.warning` * **dismissable**: is an optional field to allow users to close the alert or not. `boolean`. Defaults to -* **closeType**: is used to determine which type of close button should be place on it, and only accepts `CloseType` enum. Defaults to `CloseType.NORMAL` +* **closeType**: is used to determine which type of close button should be place on it, and only accepts `CloseType` enum. Defaults to `CloseType.TIMES` ```typescript export enum CloseType { TIMES, NORMAL } + +// usage +// NORMAL -> the close button is beneath the alert message +// TIMES -> the close button is by the far right with x + ``` + ## App Level Alert You can decide to make use of the `NgAlertService` to push new messages, useful if you want to maintain a central point of alerting your users of anything, like at the top of your page. ```typescript diff --git a/projects/alert/src/lib/alert.component.ts b/projects/alert/src/lib/alert.component.ts index fa1205e..0200c0f 100644 --- a/projects/alert/src/lib/alert.component.ts +++ b/projects/alert/src/lib/alert.component.ts @@ -11,7 +11,7 @@ export class NgAlertComponent { @Input() dismissable: boolean; rawMessage: IMessage; @Output() messageChange = new EventEmitter(); - @Input() closeType: CloseType = CloseType.NORMAL; + @Input() closeType: CloseType = CloseType.TIMES; closeTypes = CloseType; @Input()