Make it possible to define control buttons text (Back, Create, Review) per template
Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
This commit is contained in:
@@ -25,6 +25,7 @@ import { ScaffolderStep } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderTaskOutput } from '@backstage/plugin-scaffolder-react';
|
||||
import { SetStateAction } from 'react';
|
||||
import { TaskStep } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateConfigurationsV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';
|
||||
import { UIOptionsType } from '@rjsf/utils';
|
||||
@@ -183,6 +184,7 @@ export type StepperProps = {
|
||||
onCreate: (values: Record<string, JsonValue>) => Promise<void>;
|
||||
components?: {
|
||||
ReviewStateComponent?: (props: ReviewStateProps) => JSX.Element;
|
||||
backButtonText?: ReactNode;
|
||||
createButtonText?: ReactNode;
|
||||
reviewButtonText?: ReactNode;
|
||||
};
|
||||
@@ -303,6 +305,7 @@ export const useTemplateParameterSchema: (templateRef: string) => {
|
||||
// @alpha
|
||||
export const useTemplateSchema: (manifest: TemplateParameterSchema) => {
|
||||
steps: ParsedTemplateSchema[];
|
||||
configurations?: TemplateConfigurationsV1beta3 | undefined;
|
||||
};
|
||||
|
||||
// @alpha (undocumented)
|
||||
|
||||
@@ -19,6 +19,7 @@ import { PropsWithChildren } from 'react';
|
||||
import { default as React_2 } from 'react';
|
||||
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
|
||||
import { TaskStep } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateConfigurationsV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
|
||||
// @public
|
||||
export type Action = {
|
||||
@@ -317,6 +318,7 @@ export type TaskStream = {
|
||||
export type TemplateParameterSchema = {
|
||||
title: string;
|
||||
description?: string;
|
||||
configurations?: TemplateConfigurationsV1beta3;
|
||||
steps: Array<{
|
||||
title: string;
|
||||
description?: string;
|
||||
|
||||
Reference in New Issue
Block a user