From 9a70852e4d226398d47437e623b37d77c902d51d Mon Sep 17 00:00:00 2001 From: jmwilhite Date: Tue, 6 Mar 2018 14:13:20 -0800 Subject: [PATCH 1/7] #660: Add alert options --- src/app/sandbox/sandbox.component.ts | 4 ++-- src/bossy-ui/components/alert/alert.config.ts | 16 ++++++++++++++-- src/bossy-ui/components/alert/alert.html | 12 +++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/app/sandbox/sandbox.component.ts b/src/app/sandbox/sandbox.component.ts index d0d95142..aa3fa698 100644 --- a/src/app/sandbox/sandbox.component.ts +++ b/src/app/sandbox/sandbox.component.ts @@ -19,7 +19,7 @@ import {BossyFormTextareaComponent} from '../../bossy-ui/components/form-textare import {BossyFormTextareaConfig} from '../../bossy-ui/components/form-textarea/form-textarea.config'; import {Validators} from '@angular/forms'; import { BossyAlertComponent } from '../../bossy-ui/components/alert/alert.component'; -import { BossyAlertConfig } from '../../bossy-ui/components/alert/alert.config'; +import { BossyAlertConfig, alertType } from '../../bossy-ui/components/alert/alert.config'; @Component({ selector: 'app-sandbox', @@ -43,7 +43,7 @@ export class SandboxComponent implements OnInit { } ngOnInit() { - const alertConfig = new BossyAlertConfig('insertHeader', 'insertMainText', 'insertExtraText'); + const alertConfig = new BossyAlertConfig('insertHeader', 'insertMainText', 'insertExtraText', alertType.danger, true); const calendarConfig = new BossyCalendarConfig(); const formInput1 = { name: 'textInput', diff --git a/src/bossy-ui/components/alert/alert.config.ts b/src/bossy-ui/components/alert/alert.config.ts index 6d6a0f73..99706e62 100644 --- a/src/bossy-ui/components/alert/alert.config.ts +++ b/src/bossy-ui/components/alert/alert.config.ts @@ -1,6 +1,18 @@ export class BossyAlertConfig { constructor(public header: string, - public mainInfo: string, - public extraInfo: string) { + public text: string, + public subText: string, + public type: alertType, + public large: boolean) { } } +export enum alertType{ + primary= "primary", + secondary= "secondary", + success= "success", + danger= "danger", + warning= "warning", + info= "info", + light= "light", + dark= "dark" +} diff --git a/src/bossy-ui/components/alert/alert.html b/src/bossy-ui/components/alert/alert.html index dcbfb62e..07d48bb1 100644 --- a/src/bossy-ui/components/alert/alert.html +++ b/src/bossy-ui/components/alert/alert.html @@ -1,10 +1,16 @@ -