From 31216ea42fab939e88f8daa7f3227e4dcdf4aab7 Mon Sep 17 00:00:00 2001 From: Daniel Fry Date: Thu, 29 Dec 2022 14:26:33 +0000 Subject: [PATCH 1/2] allow React.ReactElement type as icon --- src/helpers/action-helpers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/action-helpers.ts b/src/helpers/action-helpers.ts index 3f02928..36694f0 100644 --- a/src/helpers/action-helpers.ts +++ b/src/helpers/action-helpers.ts @@ -1,3 +1,4 @@ +import React from 'react'; /* --------------------------- Internal Dependency -------------------------- */ import { guidGenerator } from 'utils'; @@ -19,7 +20,7 @@ export interface IScoutAction { rel?: string; keyboardShortcut?: string[]; disableIdledAction?: boolean; - icon?: HTMLElement | string; + icon?: React.ReactElement | HTMLElement | string; description?: string; ariaLabel?: string; } From 266fbca0e9fbda9962ba3111436b2eb5d9effe05 Mon Sep 17 00:00:00 2001 From: Daniel Fry Date: Fri, 30 Dec 2022 14:32:01 +0000 Subject: [PATCH 2/2] remove react import as its declared in global namespace --- src/helpers/action-helpers.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/helpers/action-helpers.ts b/src/helpers/action-helpers.ts index 36694f0..4a4f100 100644 --- a/src/helpers/action-helpers.ts +++ b/src/helpers/action-helpers.ts @@ -1,4 +1,3 @@ -import React from 'react'; /* --------------------------- Internal Dependency -------------------------- */ import { guidGenerator } from 'utils';