style(react 18): explicitly declaring children as optional props
This is to facilitate the react 18 upgrade which introduced the requirement to explicily declare children as props Helps to address #12252 Signed-off-by: Mark David Avery <mark@webark.cc>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-react': patch
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Explicitly declaring children as optional props to facilitate react 18 changes
|
||||
@@ -552,7 +552,9 @@ export interface ScaffolderDryRunResponse {
|
||||
}
|
||||
|
||||
// @public
|
||||
export const ScaffolderFieldExtensions: React_2.ComponentType;
|
||||
export const ScaffolderFieldExtensions: React_2.ComponentType<
|
||||
React_2.PropsWithChildren<{}>
|
||||
>;
|
||||
|
||||
// @public
|
||||
export interface ScaffolderGetIntegrationsListOptions {
|
||||
|
||||
@@ -94,8 +94,9 @@ export function createNextScaffolderFieldExtension<
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const ScaffolderFieldExtensions: React.ComponentType =
|
||||
(): JSX.Element | null => null;
|
||||
export const ScaffolderFieldExtensions: React.ComponentType<
|
||||
React.PropsWithChildren<{}>
|
||||
> = (): JSX.Element | null => null;
|
||||
|
||||
attachComponentData(
|
||||
ScaffolderFieldExtensions,
|
||||
|
||||
@@ -56,7 +56,9 @@ export type TechDocsAddonOptions<TAddonProps = {}> = {
|
||||
};
|
||||
|
||||
// @public
|
||||
export const TechDocsAddons: React_2.ComponentType;
|
||||
export const TechDocsAddons: React_2.ComponentType<
|
||||
React_2.PropsWithChildren<{}>
|
||||
>;
|
||||
|
||||
// @public
|
||||
export interface TechDocsApi {
|
||||
|
||||
@@ -43,7 +43,9 @@ export const TECHDOCS_ADDONS_WRAPPER_KEY = 'techdocs.addons.wrapper.v1';
|
||||
* TechDocs Addon registry.
|
||||
* @public
|
||||
*/
|
||||
export const TechDocsAddons: React.ComponentType = () => null;
|
||||
export const TechDocsAddons: React.ComponentType<
|
||||
React.PropsWithChildren<{}>
|
||||
> = () => null;
|
||||
|
||||
attachComponentData(TechDocsAddons, TECHDOCS_ADDONS_WRAPPER_KEY, true);
|
||||
|
||||
@@ -71,7 +73,9 @@ export function createTechDocsAddonExtension<TComponentProps>(
|
||||
* Create a TechDocs addon implementation.
|
||||
* @public
|
||||
*/
|
||||
export function createTechDocsAddonExtension<TComponentProps>(
|
||||
export function createTechDocsAddonExtension<
|
||||
TComponentProps extends React.PropsWithChildren<{}>,
|
||||
>(
|
||||
options: TechDocsAddonOptions<TComponentProps>,
|
||||
): Extension<(props: TComponentProps) => JSX.Element | null> {
|
||||
const { name, component: TechDocsAddon } = options;
|
||||
|
||||
Reference in New Issue
Block a user