From a2317c59173a20b7b1e5aadf08d1e71c3f460200 Mon Sep 17 00:00:00 2001 From: Cody Olsen <81981+stipsan@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:40:54 +0100 Subject: [PATCH] fix: refactor `ReactElement` to `JSX.Element` types (#1555) --- .../autocomplete/__workshop__/constrainedHeight.tsx | 2 +- src/core/components/autocomplete/autocomplete.tsx | 7 +++---- src/core/components/autocomplete/autocompleteOption.tsx | 2 +- src/core/components/dialog/dialogProvider.tsx | 2 +- src/core/components/menu/__workshop__/asComponent.tsx | 2 +- src/core/components/menu/menuButton.tsx | 4 ++-- src/core/components/menu/menuGroup.tsx | 2 +- src/core/components/tab/tabList.tsx | 4 ++-- src/core/components/toast/toast.tsx | 2 +- src/core/components/toast/toastProvider.tsx | 2 +- src/core/components/tree/tree.tsx | 2 +- src/core/components/tree/treeGroup.tsx | 2 +- src/core/components/tree/treeItem.tsx | 2 +- src/core/primitives/avatar/avatarStack.tsx | 2 +- src/core/primitives/card/__workshop__/asComponent.tsx | 2 +- src/core/primitives/popover/__workshop__/TestStory.tsx | 4 ++-- src/core/primitives/popover/popover.tsx | 6 +++--- src/core/primitives/tooltip/tooltip.tsx | 2 +- .../tooltipDelayGroup/tooltipDelayGroupProvider.tsx | 2 +- src/core/theme/__workshop__/build/story.tsx | 3 +-- src/core/theme/themeColorProvider.tsx | 2 +- src/core/theme/themeProvider.tsx | 2 +- src/core/utils/arrow/arrow.tsx | 4 ++-- src/core/utils/boundaryElement/boundaryElementProvider.tsx | 4 +--- src/core/utils/layer/layerProvider.tsx | 2 +- src/core/utils/portal/portalProvider.tsx | 2 +- src/core/utils/virtualList/virtualList.tsx | 2 +- test/utils.tsx | 4 ++-- 28 files changed, 37 insertions(+), 41 deletions(-) diff --git a/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx b/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx index 2c392c2ac..85716b0f2 100644 --- a/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +++ b/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx @@ -81,7 +81,7 @@ function ConstrainedHeightExampleField({id, label}: {id: string; label: string}) const renderPopover: AutocompleteProps['renderPopover'] = useCallback( ( popoverProps: { - content: React.ReactElement | null + content: React.JSX.Element | null hidden: boolean inputElement: HTMLInputElement | null onMouseEnter: () => void diff --git a/src/core/components/autocomplete/autocomplete.tsx b/src/core/components/autocomplete/autocomplete.tsx index c4a80d56c..4946575c3 100644 --- a/src/core/components/autocomplete/autocomplete.tsx +++ b/src/core/components/autocomplete/autocomplete.tsx @@ -6,7 +6,6 @@ import { HTMLProps, KeyboardEvent, MouseEvent, - ReactElement, ReactNode, Ref, cloneElement, @@ -73,11 +72,11 @@ export interface AutocompleteProps