From fc05b0346607e97fc1679bfa49a5a89ea43369ad Mon Sep 17 00:00:00 2001 From: Samuel Rowe Date: Thu, 11 Aug 2022 09:05:20 +0530 Subject: [PATCH] feat: updated `toaster` utility to accept JSX --- services/frontend/src/utils/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/frontend/src/utils/index.ts b/services/frontend/src/utils/index.ts index 830c3cd..746efea 100644 --- a/services/frontend/src/utils/index.ts +++ b/services/frontend/src/utils/index.ts @@ -12,6 +12,7 @@ import { } from "lodash"; import { LOCAL_STORAGE } from "../constants"; import { IServiceNodeItem, INodeLibraryItem, INodeGroup } from "../types"; +import { ReactElement } from "react"; export function ensure( argument: T | undefined | null, @@ -181,7 +182,7 @@ export const getNodeKeyFromConnectionId = (uuid: string) => { return key; }; -export const toaster = (message: string, type: string) => { +export const toaster = (message: string | ReactElement, type: string) => { const toastConfig = { duration: 3000, position: "bottom-right",