Merge pull request #19707 from RobotSail/react-18-props-with-children-upgrade
react 18 props with children upgrade
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user