@@ -6,7 +6,6 @@
|
||||
/// <reference types="react" />
|
||||
|
||||
import { ApiHolder } from '@backstage/core-plugin-api';
|
||||
import { ComponentType } from 'react';
|
||||
import { CustomFieldExtensionSchema } from '@backstage/plugin-scaffolder-react';
|
||||
import { Dispatch } from 'react';
|
||||
import { Extension } from '@backstage/core-plugin-api';
|
||||
@@ -20,8 +19,8 @@ import { JsonValue } from '@backstage/types';
|
||||
import { LayoutOptions } from '@backstage/plugin-scaffolder-react';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { default as React_2 } from 'react';
|
||||
import { ReactElement } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { RJSFSchema } from '@rjsf/utils';
|
||||
import { ScaffolderStep } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderTaskOutput } from '@backstage/plugin-scaffolder-react';
|
||||
import { SetStateAction } from 'react';
|
||||
@@ -56,8 +55,8 @@ export const extractSchemaFromStep: (inputStep: JsonObject) => {
|
||||
schema: JsonObject;
|
||||
};
|
||||
|
||||
// @alpha (undocumented)
|
||||
export const Form: ComponentType<FormProps_2<any, RJSFSchema, any>>;
|
||||
// @alpha
|
||||
export const Form: (props: PropsWithChildren<FormProps_2>) => JSX.Element;
|
||||
|
||||
// @alpha
|
||||
export type FormProps = Pick<
|
||||
@@ -132,6 +131,31 @@ export type ReviewStateProps = {
|
||||
formState: JsonObject;
|
||||
};
|
||||
|
||||
// @alpha
|
||||
export const ScaffolderField: (
|
||||
props: PropsWithChildren<ScaffolderFieldProps>,
|
||||
) => JSX.Element;
|
||||
|
||||
// @alpha
|
||||
export interface ScaffolderFieldProps {
|
||||
// (undocumented)
|
||||
disabled: boolean;
|
||||
// (undocumented)
|
||||
displayLabel?: boolean;
|
||||
// (undocumented)
|
||||
errors?: ReactElement;
|
||||
// (undocumented)
|
||||
help?: ReactElement;
|
||||
// (undocumented)
|
||||
rawDescription?: string;
|
||||
// (undocumented)
|
||||
rawErrors?: string[];
|
||||
// (undocumented)
|
||||
rawHelp?: string;
|
||||
// (undocumented)
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
// @alpha (undocumented)
|
||||
export function ScaffolderPageContextMenu(
|
||||
props: ScaffolderPageContextMenuProps,
|
||||
|
||||
@@ -30,7 +30,11 @@ const useStyles = makeStyles(theme => ({
|
||||
},
|
||||
}));
|
||||
|
||||
interface FieldProps {
|
||||
/**
|
||||
* Props for the {@link ScaffolderField} component
|
||||
* @alpha
|
||||
*/
|
||||
export interface ScaffolderFieldProps {
|
||||
rawDescription?: string;
|
||||
errors?: ReactElement;
|
||||
rawErrors?: string[];
|
||||
@@ -46,7 +50,9 @@ interface FieldProps {
|
||||
* on the field types
|
||||
* @alpha
|
||||
*/
|
||||
export const ScaffolderField = (props: PropsWithChildren<FieldProps>) => {
|
||||
export const ScaffolderField = (
|
||||
props: PropsWithChildren<ScaffolderFieldProps>,
|
||||
) => {
|
||||
const {
|
||||
children,
|
||||
displayLabel = true,
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { ScaffolderField } from './ScaffolderField';
|
||||
export { ScaffolderField, type ScaffolderFieldProps } from './ScaffolderField';
|
||||
|
||||
Reference in New Issue
Block a user