From d49cf9d3c469e0a27952529d1156f45a57628087 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Tue, 4 Dec 2018 17:03:23 +0000 Subject: [PATCH] ui: Adds warning flash messages (yellow with warning icon) (#5033) --- ui-v2/app/styles/components/flash-message/skin.scss | 6 ++++++ ui-v2/app/templates/components/app-view.hbs | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ui-v2/app/styles/components/flash-message/skin.scss b/ui-v2/app/styles/components/flash-message/skin.scss index 0c4f82f23..b06698fed 100644 --- a/ui-v2/app/styles/components/flash-message/skin.scss +++ b/ui-v2/app/styles/components/flash-message/skin.scss @@ -5,12 +5,18 @@ %flash-message p.success strong { @extend %with-passing; } +%flash-message p.warning strong { + @extend %with-warning; +} %flash-message p.error strong { @extend %with-critical; } %flash-message p.success { @extend %frame-green-500; } +%flash-message p.warning { + @extend %frame-yellow-500; +} %flash-message p.error { @extend %frame-red-500; } diff --git a/ui-v2/app/templates/components/app-view.hbs b/ui-v2/app/templates/components/app-view.hbs index 52bcfc61f..9ac7c7106 100644 --- a/ui-v2/app/templates/components/app-view.hbs +++ b/ui-v2/app/templates/components/app-view.hbs @@ -5,7 +5,12 @@ {{#flash-message flash=flash as |component flash|}} {{! flashes automatically ucfirst the type }} -

{{if (eq component.flashType 'Success') 'Success!' 'Error!'}} {{#yield-slot 'notification' (block-params (lowercase component.flashType) (lowercase flash.action) flash.item )}}{{yield}}{{/yield-slot}}

+

+ + {{component.flashType}}! + + {{#yield-slot 'notification' (block-params (lowercase component.flashType) (lowercase flash.action) flash.item )}}{{yield}}{{/yield-slot}} +

{{/flash-message}} {{/each}}