set PropsWithChildren as explicit type on components
Signed-off-by: Oleg S <97077423+RobotSail@users.noreply.github.com>
This commit is contained in:
@@ -21,12 +21,12 @@ import { wrapInTestApp, TestApiProvider } from '@backstage/test-utils';
|
||||
import { configApiRef } from '@backstage/core-plugin-api';
|
||||
import { ConfigReader } from '@backstage/core-app-api';
|
||||
import { Grid, makeStyles } from '@material-ui/core';
|
||||
import React, { ComponentType } from 'react';
|
||||
import React, { ComponentType, PropsWithChildren } from 'react';
|
||||
|
||||
export default {
|
||||
title: 'Plugins/Home/Components/CompanyLogo',
|
||||
decorators: [
|
||||
(Story: ComponentType<{}>) =>
|
||||
(Story: ComponentType<PropsWithChildren<{}>>) =>
|
||||
wrapInTestApp(
|
||||
<TestApiProvider
|
||||
apis={[
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
|
||||
import { Header } from '@backstage/core-components';
|
||||
import { wrapInTestApp } from '@backstage/test-utils';
|
||||
import React, { ComponentType } from 'react';
|
||||
import React, { ComponentType, PropsWithChildren } from 'react';
|
||||
import { ClockConfig, HeaderWorldClock } from './HeaderWorldClock';
|
||||
|
||||
export default {
|
||||
title: 'Plugins/Home/Components/HeaderWorldClock',
|
||||
decorators: [(Story: ComponentType<{}>) => wrapInTestApp(<Story />)],
|
||||
decorators: [
|
||||
(Story: ComponentType<PropsWithChildren<{}>>) => wrapInTestApp(<Story />),
|
||||
],
|
||||
};
|
||||
|
||||
export const Default = () => {
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
entityRouteRef,
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
import { Grid } from '@material-ui/core';
|
||||
import React, { ComponentType } from 'react';
|
||||
import React, { ComponentType, PropsWithChildren } from 'react';
|
||||
|
||||
const starredEntitiesApi = new MockStarredEntitiesApi();
|
||||
starredEntitiesApi.toggleStarred('component:default/example-starred-entity');
|
||||
@@ -73,7 +73,7 @@ const mockCatalogApi = {
|
||||
export default {
|
||||
title: 'Plugins/Home/Components/StarredEntities',
|
||||
decorators: [
|
||||
(Story: ComponentType<{}>) =>
|
||||
(Story: ComponentType<PropsWithChildren<{}>>) =>
|
||||
wrapInTestApp(
|
||||
<TestApiProvider
|
||||
apis={[
|
||||
|
||||
@@ -17,14 +17,16 @@
|
||||
import { InfoCard } from '@backstage/core-components';
|
||||
import { wrapInTestApp } from '@backstage/test-utils';
|
||||
import { Grid } from '@material-ui/core';
|
||||
import React, { ComponentType } from 'react';
|
||||
import React, { ComponentType, PropsWithChildren } from 'react';
|
||||
import { ComponentAccordion } from '../../componentRenderers';
|
||||
import { HomePageToolkit } from '../../plugin';
|
||||
import { TemplateBackstageLogoIcon } from '../../assets';
|
||||
|
||||
export default {
|
||||
title: 'Plugins/Home/Components/Toolkit',
|
||||
decorators: [(Story: ComponentType<{}>) => wrapInTestApp(<Story />)],
|
||||
decorators: [
|
||||
(Story: ComponentType<PropsWithChildren<{}>>) => wrapInTestApp(<Story />),
|
||||
],
|
||||
};
|
||||
|
||||
export const Default = () => {
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
|
||||
import { Header } from '@backstage/core-components';
|
||||
import { wrapInTestApp } from '@backstage/test-utils';
|
||||
import React, { ComponentType } from 'react';
|
||||
import React, { ComponentType, PropsWithChildren } from 'react';
|
||||
import { WelcomeTitle } from './WelcomeTitle';
|
||||
|
||||
export default {
|
||||
title: 'Plugins/Home/Components/WelcomeTitle',
|
||||
decorators: [(Story: ComponentType<{}>) => wrapInTestApp(<Story />)],
|
||||
decorators: [
|
||||
(Story: ComponentType<PropsWithChildren<{}>>) => wrapInTestApp(<Story />),
|
||||
],
|
||||
};
|
||||
|
||||
export const Default = () => {
|
||||
|
||||
Reference in New Issue
Block a user