From 001a6e61b46a1198b8e1f23116e62fa9b81e7aa9 Mon Sep 17 00:00:00 2001 From: Min Kim Date: Thu, 16 Mar 2023 11:26:32 -0400 Subject: [PATCH] Export TemplateWizardPageProps for the router to accept page as prop Signed-off-by: Min Kim Co-authored-by: Taras Mankovski --- plugins/scaffolder/src/next/Router/Router.tsx | 9 +++++++-- plugins/scaffolder/src/next/TemplateWizardPage/index.ts | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/scaffolder/src/next/Router/Router.tsx b/plugins/scaffolder/src/next/Router/Router.tsx index a1cace928f..e36bc7428a 100644 --- a/plugins/scaffolder/src/next/Router/Router.tsx +++ b/plugins/scaffolder/src/next/Router/Router.tsx @@ -16,7 +16,10 @@ import React, { PropsWithChildren } from 'react'; import { Routes, Route, useOutlet } from 'react-router-dom'; import { TemplateListPage, TemplateListPageProps } from '../TemplateListPage'; -import { TemplateWizardPage } from '../TemplateWizardPage'; +import { + TemplateWizardPage, + TemplateWizardPageProps, +} from '../TemplateWizardPage'; import { NextFieldExtensionOptions, FormProps, @@ -60,6 +63,7 @@ export type NextRouterProps = { output?: ScaffolderTaskOutput; }>; TemplateListPageComponent?: React.ComponentType; + TemplateWizardPageComponent?: React.ComponentType; }; groups?: TemplateGroupFilter[]; templateFilter?: (entity: TemplateEntityV1beta3) => boolean; @@ -87,6 +91,7 @@ export const Router = (props: PropsWithChildren) => { TemplateOutputsComponent, TaskPageComponent = OngoingTask, TemplateListPageComponent = TemplateListPage, + TemplateWizardPageComponent = TemplateWizardPage, } = {}, } = props; const outlet = useOutlet() || props.children; @@ -122,7 +127,7 @@ export const Router = (props: PropsWithChildren) => { path={selectedTemplateRouteRef.path} element={ -