From 19c096c3e56734c69981e0ab64933f18404696b7 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 22 Nov 2021 10:37:58 +0000 Subject: [PATCH] Updating inline alert component to handle newlines as different elements, putting out error with new lines. --- packages/bbui/src/InlineAlert/InlineAlert.svelte | 6 +++++- packages/server/src/api/controllers/datasource.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/bbui/src/InlineAlert/InlineAlert.svelte b/packages/bbui/src/InlineAlert/InlineAlert.svelte index 2e4dd0f69a..25e14b7caf 100644 --- a/packages/bbui/src/InlineAlert/InlineAlert.svelte +++ b/packages/bbui/src/InlineAlert/InlineAlert.svelte @@ -8,6 +8,8 @@ export let onConfirm = undefined $: icon = selectIcon(type) + // if newlines used, convert them to different elements + $: split = message.split("\n") function selectIcon(alertType) { switch (alertType) { @@ -33,7 +35,9 @@
{header}
-
{message}
+ {#each split as splitMsg} +
{splitMsg}
+ {/each} {#if onConfirm}