From 77094f3ea14c04fd868644f0a192d122786ac5de Mon Sep 17 00:00:00 2001 From: Sascha Braun Date: Sun, 16 Jun 2019 12:12:44 +0200 Subject: [PATCH] feat: add alert effect input --- ex/docs/alert.json | 7 +++++++ src/alert/alert.ts | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ex/docs/alert.json b/ex/docs/alert.json index 8f35367..b5ac026 100644 --- a/ex/docs/alert.json +++ b/ex/docs/alert.json @@ -42,6 +42,13 @@ "type": "EventEmitter", "enum": null, "default": null + }, + { + "name": "effect", + "notes": "Choose theme", + "type": "string", + "enum": "light / dark", + "default": "light" } ] } diff --git a/src/alert/alert.ts b/src/alert/alert.ts index b134f80..0d63fbb 100644 --- a/src/alert/alert.ts +++ b/src/alert/alert.ts @@ -16,7 +16,7 @@ export const ICON_CLASS_MAP: { [key: string]: string } = { animations: [fadeAnimation], changeDetection: ChangeDetectionStrategy.OnPush, template: ` -
@@ -41,6 +41,7 @@ export class ElAlert { @ContentChild('description') descriptionTmp: TemplateRef @Input() type: string = 'info' + @Input() effect: string = 'light' @Input() center: boolean = false @Input() description: string @Input() closable: boolean = true