Merge pull request #19707 from RobotSail/react-18-props-with-children-upgrade

react 18 props with children upgrade
This commit is contained in:
Fredrik Adelöw
2023-09-12 12:01:55 +02:00
committed by GitHub
25 changed files with 77 additions and 61 deletions
+2 -1
View File
@@ -26,6 +26,7 @@ import { JsonValue } from '@backstage/types';
import { MatcherFunction } from '@testing-library/react';
import { Observable } from '@backstage/types';
import { PermissionApi } from '@backstage/plugin-permission-react';
import { PropsWithChildren } from 'react';
import { default as React_2 } from 'react';
import { ReactElement } from 'react';
import { ReactNode } from 'react';
@@ -192,7 +193,7 @@ export type MockStorageBucket = {
// @public
export function renderInTestApp(
Component: ComponentType | ReactNode,
Component: ComponentType<PropsWithChildren<{}>> | ReactNode,
options?: TestAppOptions,
): Promise<RenderResult>;
@@ -14,7 +14,12 @@
* limitations under the License.
*/
import React, { ComponentType, ReactNode, ReactElement } from 'react';
import React, {
ComponentType,
ReactNode,
ReactElement,
PropsWithChildren,
} from 'react';
import { MemoryRouter } from 'react-router-dom';
import { Route } from 'react-router-dom';
import { UnifiedThemeProvider, themes } from '@backstage/theme';
@@ -226,7 +231,7 @@ export function wrapInTestApp(
* @public
*/
export async function renderInTestApp(
Component: ComponentType | ReactNode,
Component: ComponentType<PropsWithChildren<{}>> | ReactNode,
options: TestAppOptions = {},
): Promise<RenderResult> {
let wrappedElement: React.ReactElement;