set PropsWithChildren as explicit type on components
Signed-off-by: Oleg S <97077423+RobotSail@users.noreply.github.com>
This commit is contained in:
@@ -18,12 +18,12 @@ import { rootRouteRef, HomePageSearchBar } from '../../plugin';
|
||||
import { searchApiRef } from '@backstage/plugin-search-react';
|
||||
import { wrapInTestApp, TestApiProvider } from '@backstage/test-utils';
|
||||
import { Grid, makeStyles } from '@material-ui/core';
|
||||
import React, { ComponentType } from 'react';
|
||||
import React, { ComponentType, PropsWithChildren } from 'react';
|
||||
|
||||
export default {
|
||||
title: 'Plugins/Home/Components/SearchBar',
|
||||
decorators: [
|
||||
(Story: ComponentType<{}>) =>
|
||||
(Story: ComponentType<PropsWithChildren<{}>>) =>
|
||||
wrapInTestApp(
|
||||
<>
|
||||
<TestApiProvider
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
Paper,
|
||||
} from '@material-ui/core';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React, { ComponentType } from 'react';
|
||||
import React, { ComponentType, PropsWithChildren } from 'react';
|
||||
import { rootRouteRef } from '../../plugin';
|
||||
import {
|
||||
SearchBar,
|
||||
@@ -74,7 +74,7 @@ export default {
|
||||
title: 'Plugins/Search/SearchModal',
|
||||
component: SearchModal,
|
||||
decorators: [
|
||||
(Story: ComponentType<{}>) =>
|
||||
(Story: ComponentType<PropsWithChildren<{}>>) =>
|
||||
wrapInTestApp(
|
||||
<TestApiProvider
|
||||
apis={[[searchApiRef, new MockSearchApi(mockResults)]]}
|
||||
|
||||
@@ -18,7 +18,7 @@ import { Grid, Paper } from '@material-ui/core';
|
||||
import CatalogIcon from '@material-ui/icons/MenuBook';
|
||||
import DocsIcon from '@material-ui/icons/Description';
|
||||
import UsersGroupsIcon from '@material-ui/icons/Person';
|
||||
import React, { ComponentType } from 'react';
|
||||
import React, { ComponentType, PropsWithChildren } from 'react';
|
||||
import { SearchType } from './SearchType';
|
||||
import { TestApiProvider } from '@backstage/test-utils';
|
||||
import {
|
||||
@@ -31,7 +31,7 @@ export default {
|
||||
title: 'Plugins/Search/SearchType',
|
||||
component: SearchType,
|
||||
decorators: [
|
||||
(Story: ComponentType<{}>) => (
|
||||
(Story: ComponentType<PropsWithChildren<{}>>) => (
|
||||
<TestApiProvider apis={[[searchApiRef, new MockSearchApi()]]}>
|
||||
<SearchContextProvider>
|
||||
<Grid container direction="row">
|
||||
|
||||
Reference in New Issue
Block a user