set PropsWithChildren as explicit type on components

Signed-off-by: Oleg S <97077423+RobotSail@users.noreply.github.com>
This commit is contained in:
Oleg S
2023-05-05 13:26:58 -04:00
committed by Fredrik Adelöw
parent 38d8ad9373
commit 74b216ee4e
64 changed files with 149 additions and 110 deletions
@@ -19,7 +19,7 @@ import { wrapInTestApp, TestApiProvider } from '@backstage/test-utils';
import { configApiRef } from '@backstage/core-plugin-api';
import { ConfigReader } from '@backstage/config';
import { Grid } from '@material-ui/core';
import React, { ComponentType } from 'react';
import React, { ComponentType, PropsWithChildren } from 'react';
import { StackOverflowIcon } from '../../icons';
import { stackOverflowApiRef } from '../../api';
@@ -46,7 +46,7 @@ export default {
title: 'Plugins/Home/Components/StackOverflow',
component: HomePageStackOverflowQuestions,
decorators: [
(Story: ComponentType<{}>) =>
(Story: ComponentType<PropsWithChildren<{}>>) =>
wrapInTestApp(
<>
<TestApiProvider
@@ -16,13 +16,15 @@
import { StackOverflowSearchResultListItem } from '../../plugin';
import { wrapInTestApp } from '@backstage/test-utils';
import React, { ComponentType } from 'react';
import React, { ComponentType, PropsWithChildren } from 'react';
import { StackOverflowIcon } from '../../icons';
export default {
title: 'Plugins/Search/StackOverflowResultListItem',
component: StackOverflowSearchResultListItem,
decorators: [(Story: ComponentType<{}>) => wrapInTestApp(<Story />)],
decorators: [
(Story: ComponentType<PropsWithChildren<{}>>) => wrapInTestApp(<Story />),
],
};
export const Default = () => {