update to the correct type the new prop
Signed-off-by: victormorfin97 <v-vmorfin@expediagroup.com>
This commit is contained in:
@@ -14,8 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import React, { ComponentType } from 'react';
|
||||
import { Routes, Route, useOutlet } from 'react-router';
|
||||
import { TemplateEntityV1beta2 } from '@backstage/catalog-model';
|
||||
import { ScaffolderPage } from './ScaffolderPage';
|
||||
import { TemplatePage } from './TemplatePage';
|
||||
import { TaskPage } from './TaskPage';
|
||||
@@ -30,7 +31,9 @@ import {
|
||||
import { useElementFilter } from '@backstage/core-plugin-api';
|
||||
|
||||
type RouterProps = {
|
||||
TemplateCardComponent?: (props: any) => JSX.Element | null;
|
||||
TemplateCardComponent?:
|
||||
| ComponentType<{ template: TemplateEntityV1beta2 }>
|
||||
| undefined;
|
||||
};
|
||||
|
||||
export const Router = ({ TemplateCardComponent }: RouterProps) => {
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
Page,
|
||||
SupportButton,
|
||||
} from '@backstage/core-components';
|
||||
import { TemplateEntityV1beta2 } from '@backstage/catalog-model';
|
||||
import { useRouteRef } from '@backstage/core-plugin-api';
|
||||
import {
|
||||
EntityKindPicker,
|
||||
@@ -32,7 +33,7 @@ import {
|
||||
UserListPicker,
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
import React from 'react';
|
||||
import React, { ComponentType } from 'react';
|
||||
import { registerComponentRouteRef } from '../../routes';
|
||||
import { TemplateList } from '../TemplateList';
|
||||
import { TemplateTypePicker } from '../TemplateTypePicker';
|
||||
@@ -47,7 +48,9 @@ const useStyles = makeStyles(theme => ({
|
||||
}));
|
||||
|
||||
export type ScaffolderPageProps = {
|
||||
TemplateCardComponent?: (props: any) => JSX.Element | null;
|
||||
TemplateCardComponent?:
|
||||
| ComponentType<{ template: TemplateEntityV1beta2 }>
|
||||
| undefined;
|
||||
};
|
||||
|
||||
export const ScaffolderPageContents = ({
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import React, { ComponentType } from 'react';
|
||||
import { TemplateEntityV1beta2 } from '@backstage/catalog-model';
|
||||
import {
|
||||
ItemCardGrid,
|
||||
@@ -28,7 +28,9 @@ import { TemplateCard, TemplateCardProps } from '../TemplateCard';
|
||||
export type Props = TemplateCardProps;
|
||||
|
||||
export type TemplateListProps = {
|
||||
TemplateCardComponent?: (props: Props) => JSX.Element | null;
|
||||
TemplateCardComponent?:
|
||||
| ComponentType<{ template: TemplateEntityV1beta2 }>
|
||||
| undefined;
|
||||
};
|
||||
|
||||
export const TemplateList = ({ TemplateCardComponent }: TemplateListProps) => {
|
||||
|
||||
Reference in New Issue
Block a user