From ccea21621ec81c6a47105f9ece9b543422b13802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= Date: Tue, 27 Aug 2024 11:01:45 +0200 Subject: [PATCH] frontend: Fix deprecated Story import with StoryFn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: René Dudfield --- .../PluginSettings/PluginSettingsDetails.stories.tsx | 8 ++++---- .../DetailsViewSection/DetailsViewSection.stories.tsx | 4 ++-- frontend/src/components/Sidebar/Sidebar.stories.tsx | 4 ++-- .../src/components/Sidebar/Sidebaritem.stories.tsx | 4 ++-- .../common/ErrorBoundary/ErrorBoundary.stories.tsx | 10 +++++----- .../components/common/ErrorPage/ErrorPage.stories.tsx | 4 ++-- .../common/Label.stories/HeaderLabel.stories.tsx | 4 ++-- .../common/Label.stories/HoverInfoLabel.stories.tsx | 4 ++-- .../common/Label.stories/InfoLabel.stories.tsx | 4 ++-- .../common/Label.stories/NameLabel.stories.tsx | 6 ++++-- .../common/Label.stories/StatusLabel.stories.tsx | 4 ++-- .../common/Label.stories/ValueLabel.stories.tsx | 4 ++-- .../common/NameValueTable/NameValueTable.stories.tsx | 4 ++-- .../common/Resource/EditorDialog.stories.tsx | 4 ++-- .../MainInfoSection/MainInfoSection.stories.tsx | 4 ++-- .../common/Resource/MetadataDisplay.stories.tsx | 4 ++-- .../common/Resource/ResourceListView.stories.tsx | 4 ++-- .../common/Resource/ResourceTable.stories.tsx | 4 ++-- .../common/Resource/SimpleEditor.stories.tsx | 4 ++-- .../components/common/Resource/ViewButton.stories.tsx | 4 ++-- .../common/ShowHideLabel/ShowHideLabel.stories.tsx | 4 ++-- frontend/src/components/common/Tabs.stories.tsx | 4 ++-- .../components/common/TileChart/TileChart.stories.tsx | 4 ++-- .../components/common/Tooltip/TooltipIcon.stories.tsx | 4 ++-- .../components/common/Tooltip/TooltipLight.stories.tsx | 4 ++-- .../crd/CustomResourceDefinition.stories.tsx | 4 ++-- .../components/crd/CustomResourceDetails.stories.tsx | 4 ++-- .../src/components/crd/CustomResourceList.stories.tsx | 4 ++-- .../src/components/cronjob/CronJobDetails.stories.tsx | 4 ++-- frontend/src/components/daemonset/List.stories.tsx | 4 ++-- .../components/endpoints/EndpointDetails.stories.tsx | 4 ++-- .../src/components/endpoints/EndpointList.stories.tsx | 4 ++-- .../horizontalPodAutoscaler/HPADetails.stories.tsx | 4 ++-- .../horizontalPodAutoscaler/HPAList.stories.tsx | 4 ++-- .../src/components/ingress/ClassDetails.stories.tsx | 4 ++-- frontend/src/components/ingress/ClassList.stories.tsx | 4 ++-- frontend/src/components/ingress/Details.stories.tsx | 4 ++-- .../components/ingress/LinkStringFormat.stories.tsx | 4 ++-- frontend/src/components/ingress/List.stories.tsx | 4 ++-- frontend/src/components/job/JobList.stories.tsx | 4 ++-- frontend/src/components/limitRange/Details.stories.tsx | 4 ++-- frontend/src/components/limitRange/List.stories.tsx | 4 ++-- .../components/namespace/NamespaceDetails.stories.tsx | 4 ++-- .../src/components/namespace/NamespaceList.stories.tsx | 4 ++-- frontend/src/components/node/List.stories.tsx | 4 ++-- frontend/src/components/pod/PodDetails.stories.tsx | 4 ++-- frontend/src/components/pod/PodList.stories.tsx | 4 ++-- frontend/src/components/pod/PodLogs.stories.tsx | 4 ++-- .../components/pod/podDetailsVolumeSection.stories.tsx | 4 ++-- .../podDisruptionBudget/pdbDetails.stories.tsx | 4 ++-- .../components/podDisruptionBudget/pdbList.stories.tsx | 4 ++-- .../priorityClass/priorityClassDetails.stories.tsx | 4 ++-- .../priorityClass/priorityClassList.stories.tsx | 4 ++-- frontend/src/components/replicaset/List.stories.tsx | 4 ++-- .../resourceQuota/resourceQuotaDetails.stories.tsx | 4 ++-- .../resourceQuota/resourceQuotaList.stories.tsx | 4 ++-- .../src/components/storage/ClaimDetails.stories.tsx | 4 ++-- frontend/src/components/storage/ClaimList.stories.tsx | 4 ++-- .../src/components/storage/ClassDetails.stories.tsx | 4 ++-- frontend/src/components/storage/ClassList.stories.tsx | 4 ++-- .../src/components/storage/VolumeDetails.stories.tsx | 4 ++-- frontend/src/components/storage/VolumeList.stories.tsx | 4 ++-- .../MutatingWebhookConfigDetails.stories.tsx | 4 ++-- .../MutatingWebhookConfigList.stories.tsx | 4 ++-- .../ValidatingWebhookConfigDetails.stories.tsx | 4 ++-- .../ValidatingWebhookConfigList.stories.tsx | 4 ++-- .../src/i18n/LocaleSelect/LocaleSelect.stories.tsx | 4 ++-- 67 files changed, 141 insertions(+), 139 deletions(-) diff --git a/frontend/src/components/App/PluginSettings/PluginSettingsDetails.stories.tsx b/frontend/src/components/App/PluginSettings/PluginSettingsDetails.stories.tsx index 8ac35ff235..26a5c7b9b7 100644 --- a/frontend/src/components/App/PluginSettings/PluginSettingsDetails.stories.tsx +++ b/frontend/src/components/App/PluginSettings/PluginSettingsDetails.stories.tsx @@ -1,5 +1,5 @@ import { TextField } from '@mui/material'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { PluginInfo, PluginSettingsDetailsProps } from '../../../plugin/pluginsSlice'; import { PluginSettingsDetailsPure, PluginSettingsDetailsPureProps } from './PluginSettingsDetails'; @@ -64,9 +64,9 @@ const mockConfig = { name: 'mockPlugin', }; -const Template: Story = (args: PluginSettingsDetailsPureProps) => ( - -); +const Template: StoryFn = ( + args: PluginSettingsDetailsPureProps +) => ; export const WithAutoSave = Template.bind({}); WithAutoSave.args = { diff --git a/frontend/src/components/DetailsViewSection/DetailsViewSection.stories.tsx b/frontend/src/components/DetailsViewSection/DetailsViewSection.stories.tsx index 0ec1a2246a..639fc678a5 100644 --- a/frontend/src/components/DetailsViewSection/DetailsViewSection.stories.tsx +++ b/frontend/src/components/DetailsViewSection/DetailsViewSection.stories.tsx @@ -1,5 +1,5 @@ import { configureStore } from '@reduxjs/toolkit'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { Provider } from 'react-redux'; import { useDispatch } from 'react-redux'; @@ -35,7 +35,7 @@ export default { ], } as Meta; -const Template: Story = args => { +const Template: StoryFn = args => { const dispatch = useDispatch(); React.useEffect(() => { dispatch( diff --git a/frontend/src/components/Sidebar/Sidebar.stories.tsx b/frontend/src/components/Sidebar/Sidebar.stories.tsx index 1f0b228bba..434b86a0df 100644 --- a/frontend/src/components/Sidebar/Sidebar.stories.tsx +++ b/frontend/src/components/Sidebar/Sidebar.stories.tsx @@ -1,5 +1,5 @@ import { configureStore } from '@reduxjs/toolkit'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { SnackbarProvider } from 'notistack'; import { initialState as CONFIG_INITIAL_STATE } from '../../redux/configSlice'; import { initialState as FILTER_INITIAL_STATE } from '../../redux/filterSlice'; @@ -18,7 +18,7 @@ export default { type StoryProps = Partial; -const Template: Story = args => { +const Template: StoryFn = args => { const sidebarStore = configureStore({ reducer: ( state = { diff --git a/frontend/src/components/Sidebar/Sidebaritem.stories.tsx b/frontend/src/components/Sidebar/Sidebaritem.stories.tsx index 77a363f4e4..89e8b46416 100644 --- a/frontend/src/components/Sidebar/Sidebaritem.stories.tsx +++ b/frontend/src/components/Sidebar/Sidebaritem.stories.tsx @@ -1,6 +1,6 @@ import Grid from '@mui/material/Grid'; import List from '@mui/material/List'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { Provider } from 'react-redux'; import { MemoryRouter } from 'react-router-dom'; @@ -20,7 +20,7 @@ export default { ], } as Meta; -const Template: Story = args => { +const Template: StoryFn = args => { return ( diff --git a/frontend/src/components/common/ErrorBoundary/ErrorBoundary.stories.tsx b/frontend/src/components/common/ErrorBoundary/ErrorBoundary.stories.tsx index 9ed739c230..60769bece6 100644 --- a/frontend/src/components/common/ErrorBoundary/ErrorBoundary.stories.tsx +++ b/frontend/src/components/common/ErrorBoundary/ErrorBoundary.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import ErrorBoundary, { ErrorBoundaryProps } from './ErrorBoundary'; @@ -14,7 +14,7 @@ const storyData = { } as Meta; export default storyData; -const Template: Story = args => ( +const Template: StoryFn = args => ( This is not failing. @@ -24,14 +24,14 @@ NoProblem.args = {}; // Do not run these under test, because they emit lots of console.error logs. // It's still useful to run them in the storybook, to see and test them manually. -type StoryOrNull = Story | (() => void); +type StoryOrNull = StoryFn | (() => void); let BrokenNoFallback: StoryOrNull = () => 'disabled under test to avoid console spam'; let BrokenFallback: StoryOrNull = () => 'disabled under test to avoid console spam'; let BrokenFallbackElement: StoryOrNull = () => 'disabled under test to avoid console spam'; if (import.meta.env.UNDER_TEST !== 'true') { // These are only seen in the storybook, not under test. - const BrokenTemplate: Story = args => ( + const BrokenTemplate: StoryFn = args => ( @@ -39,7 +39,7 @@ if (import.meta.env.UNDER_TEST !== 'true') { BrokenNoFallback = BrokenTemplate.bind({}); BrokenNoFallback.args = {}; - const BrokenFallbackTemplate: Story = args => ( + const BrokenFallbackTemplate: StoryFn = args => ( diff --git a/frontend/src/components/common/ErrorPage/ErrorPage.stories.tsx b/frontend/src/components/common/ErrorPage/ErrorPage.stories.tsx index 8a2acca8a3..bc768d1a47 100644 --- a/frontend/src/components/common/ErrorPage/ErrorPage.stories.tsx +++ b/frontend/src/components/common/ErrorPage/ErrorPage.stories.tsx @@ -1,6 +1,6 @@ import Button from '@mui/material/Button'; import Typography from '@mui/material/Typography'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import NotFoundImage from '../../../assets/headlamp-404.svg'; import ErrorComponent, { ErrorComponentProps } from '.'; @@ -9,7 +9,7 @@ export default { title: 'common/GenericError', component: ErrorComponent, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const Default = Template.bind({}); diff --git a/frontend/src/components/common/Label.stories/HeaderLabel.stories.tsx b/frontend/src/components/common/Label.stories/HeaderLabel.stories.tsx index 087acd3d36..82cff37135 100644 --- a/frontend/src/components/common/Label.stories/HeaderLabel.stories.tsx +++ b/frontend/src/components/common/Label.stories/HeaderLabel.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { HeaderLabel as HeaderLabelComponent, HeaderLabelProps } from '../Label'; @@ -8,7 +8,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const HeaderLabel = Template.bind({}); HeaderLabel.args = { diff --git a/frontend/src/components/common/Label.stories/HoverInfoLabel.stories.tsx b/frontend/src/components/common/Label.stories/HoverInfoLabel.stories.tsx index a82f273a31..47b2be2325 100644 --- a/frontend/src/components/common/Label.stories/HoverInfoLabel.stories.tsx +++ b/frontend/src/components/common/Label.stories/HoverInfoLabel.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { HoverInfoLabel as HoverInfoLabelComponent, HoverInfoLabelProps } from '../Label'; export default { @@ -7,7 +7,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const HoverInfoLabel = Template.bind({}); HoverInfoLabel.args = { diff --git a/frontend/src/components/common/Label.stories/InfoLabel.stories.tsx b/frontend/src/components/common/Label.stories/InfoLabel.stories.tsx index fa6358c9d2..eafe7e365a 100644 --- a/frontend/src/components/common/Label.stories/InfoLabel.stories.tsx +++ b/frontend/src/components/common/Label.stories/InfoLabel.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { InfoLabel as InfoLabelComponent, InfoLabelProps } from '../Label'; @@ -8,7 +8,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const InfoLabel = Template.bind({}); InfoLabel.args = { diff --git a/frontend/src/components/common/Label.stories/NameLabel.stories.tsx b/frontend/src/components/common/Label.stories/NameLabel.stories.tsx index eb93d28121..cad9a345ab 100644 --- a/frontend/src/components/common/Label.stories/NameLabel.stories.tsx +++ b/frontend/src/components/common/Label.stories/NameLabel.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { NameLabel as NameLabelComponent } from '../Label'; @@ -8,7 +8,9 @@ export default { argTypes: {}, } as Meta; -const Template: Story<{}> = args => A name label; +const Template: StoryFn<{}> = args => ( + A name label +); export const NameLabel = Template.bind({ component: NameLabelComponent, diff --git a/frontend/src/components/common/Label.stories/StatusLabel.stories.tsx b/frontend/src/components/common/Label.stories/StatusLabel.stories.tsx index 26ee169ce8..3ee9359534 100644 --- a/frontend/src/components/common/Label.stories/StatusLabel.stories.tsx +++ b/frontend/src/components/common/Label.stories/StatusLabel.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { StatusLabel as StatusLabelComponent, StatusLabelProps } from '../Label'; @@ -8,7 +8,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => ( +const Template: StoryFn = args => ( {args.status} ); diff --git a/frontend/src/components/common/Label.stories/ValueLabel.stories.tsx b/frontend/src/components/common/Label.stories/ValueLabel.stories.tsx index fd37e93e72..53a0fc122d 100644 --- a/frontend/src/components/common/Label.stories/ValueLabel.stories.tsx +++ b/frontend/src/components/common/Label.stories/ValueLabel.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { ValueLabel as ValueLabelComponent } from '../Label'; @@ -8,7 +8,7 @@ export default { argTypes: {}, } as Meta; -const ValueLabelTemplate: Story<{}> = args => ( +const ValueLabelTemplate: StoryFn<{}> = args => ( A ValueLabel is here ); diff --git a/frontend/src/components/common/NameValueTable/NameValueTable.stories.tsx b/frontend/src/components/common/NameValueTable/NameValueTable.stories.tsx index ba400e9a8b..54aeb0975e 100644 --- a/frontend/src/components/common/NameValueTable/NameValueTable.stories.tsx +++ b/frontend/src/components/common/NameValueTable/NameValueTable.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import NameValueTable, { NameValueTableProps } from './NameValueTable'; export default { @@ -7,7 +7,7 @@ export default { argTypes: { onTabChanged: { action: 'tab changed' } }, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const WithChildren = Template.bind({}); WithChildren.args = { diff --git a/frontend/src/components/common/Resource/EditorDialog.stories.tsx b/frontend/src/components/common/Resource/EditorDialog.stories.tsx index 5ddc0b3ecf..24399fa6e5 100644 --- a/frontend/src/components/common/Resource/EditorDialog.stories.tsx +++ b/frontend/src/components/common/Resource/EditorDialog.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { EditorDialog, EditorDialogProps } from '..'; export default { @@ -7,7 +7,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => { +const Template: StoryFn = args => { return ( = (args: MainInfoSectionProps) => ( +const Template: StoryFn = (args: MainInfoSectionProps) => ( diff --git a/frontend/src/components/common/Resource/MetadataDisplay.stories.tsx b/frontend/src/components/common/Resource/MetadataDisplay.stories.tsx index 6a4e640168..69f33aa229 100644 --- a/frontend/src/components/common/Resource/MetadataDisplay.stories.tsx +++ b/frontend/src/components/common/Resource/MetadataDisplay.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObjectInterface } from '../../../lib/k8s/cluster'; import { TestContext } from '../../../test'; import { @@ -18,7 +18,7 @@ export default { ], } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; const mockResource: KubeObjectInterface = { kind: 'MyKind', diff --git a/frontend/src/components/common/Resource/ResourceListView.stories.tsx b/frontend/src/components/common/Resource/ResourceListView.stories.tsx index 2cf893e5f7..7ab83fd6ee 100644 --- a/frontend/src/components/common/Resource/ResourceListView.stories.tsx +++ b/frontend/src/components/common/Resource/ResourceListView.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import Pod from '../../../lib/k8s/pod'; import { TestContext } from '../../../test'; import { generateK8sResourceList } from '../../../test/mocker'; @@ -22,7 +22,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ( ; namespaces: string[]; search: string; diff --git a/frontend/src/components/common/Resource/SimpleEditor.stories.tsx b/frontend/src/components/common/Resource/SimpleEditor.stories.tsx index b623aed138..c7210615de 100644 --- a/frontend/src/components/common/Resource/SimpleEditor.stories.tsx +++ b/frontend/src/components/common/Resource/SimpleEditor.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import SimpleEditor from './SimpleEditor'; import { SimpleEditorProps } from './SimpleEditor'; @@ -9,7 +9,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => { +const Template: StoryFn = args => { const [value, setValue] = React.useState(''); return ( setValue(value)} language="yaml" /> diff --git a/frontend/src/components/common/Resource/ViewButton.stories.tsx b/frontend/src/components/common/Resource/ViewButton.stories.tsx index b46a419773..e002a6face 100644 --- a/frontend/src/components/common/Resource/ViewButton.stories.tsx +++ b/frontend/src/components/common/Resource/ViewButton.stories.tsx @@ -1,5 +1,5 @@ import '../../../i18n/config'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import ViewButton from './ViewButton'; import { ViewButtonProps } from './ViewButton'; @@ -10,7 +10,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const View = Template.bind({}); View.args = { diff --git a/frontend/src/components/common/ShowHideLabel/ShowHideLabel.stories.tsx b/frontend/src/components/common/ShowHideLabel/ShowHideLabel.stories.tsx index 22e34e3415..c7140904ef 100644 --- a/frontend/src/components/common/ShowHideLabel/ShowHideLabel.stories.tsx +++ b/frontend/src/components/common/ShowHideLabel/ShowHideLabel.stories.tsx @@ -1,5 +1,5 @@ import { Box } from '@mui/material'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import ShowHideLabel, { ShowHideLabelProps } from './ShowHideLabel'; export default { @@ -8,7 +8,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => ( +const Template: StoryFn = args => ( diff --git a/frontend/src/components/common/Tabs.stories.tsx b/frontend/src/components/common/Tabs.stories.tsx index df5e1ba5d4..23160b390a 100644 --- a/frontend/src/components/common/Tabs.stories.tsx +++ b/frontend/src/components/common/Tabs.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import Tabs, { TabsProps } from './Tabs'; @@ -8,7 +8,7 @@ export default { argTypes: { onTabChanged: { action: 'tab changed' } }, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const BasicTabs = Template.bind({}); BasicTabs.args = { diff --git a/frontend/src/components/common/TileChart/TileChart.stories.tsx b/frontend/src/components/common/TileChart/TileChart.stories.tsx index 90307abde1..115520e6f9 100644 --- a/frontend/src/components/common/TileChart/TileChart.stories.tsx +++ b/frontend/src/components/common/TileChart/TileChart.stories.tsx @@ -1,5 +1,5 @@ import '../../../i18n/config'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import TileChart, { TileChartProps } from './TileChart'; export default { @@ -8,7 +8,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const WithProgress = Template.bind({}); WithProgress.args = { diff --git a/frontend/src/components/common/Tooltip/TooltipIcon.stories.tsx b/frontend/src/components/common/Tooltip/TooltipIcon.stories.tsx index f34e0f4770..8588d4b4ca 100644 --- a/frontend/src/components/common/Tooltip/TooltipIcon.stories.tsx +++ b/frontend/src/components/common/Tooltip/TooltipIcon.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import TooltipIcon, { TooltipIconProps } from './TooltipIcon'; @@ -7,7 +7,7 @@ export default { component: TooltipIcon, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const JustText = Template.bind({}); JustText.args = { diff --git a/frontend/src/components/common/Tooltip/TooltipLight.stories.tsx b/frontend/src/components/common/Tooltip/TooltipLight.stories.tsx index 85734b93f0..50b62a4cd4 100644 --- a/frontend/src/components/common/Tooltip/TooltipLight.stories.tsx +++ b/frontend/src/components/common/Tooltip/TooltipLight.stories.tsx @@ -1,6 +1,6 @@ import { Icon } from '@iconify/react'; import IconButton from '@mui/material/IconButton'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import i18next from 'i18next'; import TooltipLight, { TooltipLightProps } from './TooltipLight'; @@ -9,7 +9,7 @@ export default { component: TooltipLight, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const Add = Template.bind({}); Add.args = { diff --git a/frontend/src/components/crd/CustomResourceDefinition.stories.tsx b/frontend/src/components/crd/CustomResourceDefinition.stories.tsx index caa560e214..c76977a014 100644 --- a/frontend/src/components/crd/CustomResourceDefinition.stories.tsx +++ b/frontend/src/components/crd/CustomResourceDefinition.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObjectClass } from '../../lib/k8s/cluster'; import CustomResourceDefinition from '../../lib/k8s/crd'; import { overrideKubeObject, TestContext, TestContextProps } from '../../test'; @@ -22,7 +22,7 @@ export default { decorators: [Story => ], } as Meta; -const Template: Story = args => { +const Template: StoryFn = args => { const { useGet, useList, useApiGet, useApiList, name, namespace, viewType = 'list' } = args; const routerMap: TestContextProps['routerMap'] = {}; diff --git a/frontend/src/components/crd/CustomResourceDetails.stories.tsx b/frontend/src/components/crd/CustomResourceDetails.stories.tsx index 707a48eaba..69346d6673 100644 --- a/frontend/src/components/crd/CustomResourceDetails.stories.tsx +++ b/frontend/src/components/crd/CustomResourceDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { ResourceClasses } from '../../lib/k8s'; import CustomResourceDefinition from '../../lib/k8s/crd'; import { overrideKubeObject, TestContext } from '../../test'; @@ -27,7 +27,7 @@ export default { ], } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const NoError = Template.bind({}); NoError.args = { diff --git a/frontend/src/components/crd/CustomResourceList.stories.tsx b/frontend/src/components/crd/CustomResourceList.stories.tsx index f0dc3a9a68..d13f82c898 100644 --- a/frontend/src/components/crd/CustomResourceList.stories.tsx +++ b/frontend/src/components/crd/CustomResourceList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObjectClass } from '../../lib/k8s/cluster'; import CustomResourceDefinition from '../../lib/k8s/crd'; import { overrideKubeObject, TestContext, TestContextProps } from '../../test'; @@ -16,7 +16,7 @@ export default { decorators: [Story => ], } as Meta; -const Template: Story = args => { +const Template: StoryFn = args => { const { useApiGet, routerParams = {} } = args; const routerMap: TestContextProps['routerMap'] = routerParams; diff --git a/frontend/src/components/cronjob/CronJobDetails.stories.tsx b/frontend/src/components/cronjob/CronJobDetails.stories.tsx index 43886d0b3e..9908c5280f 100644 --- a/frontend/src/components/cronjob/CronJobDetails.stories.tsx +++ b/frontend/src/components/cronjob/CronJobDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObjectClass } from '../../lib/k8s/cluster'; import CronJob from '../../lib/k8s/cronJob'; import Job from '../../lib/k8s/job'; @@ -33,7 +33,7 @@ interface MockerStory { cronJobName: string; } -const Template: Story = args => { +const Template: StoryFn = args => { const { useGet, useList, cronJobName } = args; if (!!useGet) { diff --git a/frontend/src/components/daemonset/List.stories.tsx b/frontend/src/components/daemonset/List.stories.tsx index 720fd406e6..e52117f7db 100644 --- a/frontend/src/components/daemonset/List.stories.tsx +++ b/frontend/src/components/daemonset/List.stories.tsx @@ -1,5 +1,5 @@ import Container from '@mui/material/Container'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import DaemonSet from '../../lib/k8s/daemonSet'; import { TestContext } from '../../test'; import List from './List'; @@ -299,7 +299,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ( diff --git a/frontend/src/components/endpoints/EndpointDetails.stories.tsx b/frontend/src/components/endpoints/EndpointDetails.stories.tsx index 67f99d429f..6c1f6d69c1 100644 --- a/frontend/src/components/endpoints/EndpointDetails.stories.tsx +++ b/frontend/src/components/endpoints/EndpointDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObjectClass } from '../../lib/k8s/cluster'; import Endpoints, { KubeEndpoint } from '../../lib/k8s/endpoints'; import { TestContext } from '../../test'; @@ -81,7 +81,7 @@ interface MockerStory { useList?: KubeObjectClass['useList']; } -const Template: Story = (args: MockerStory) => { +const Template: StoryFn = (args: MockerStory) => { if (!!args.useGet) { Endpoints.useGet = args.useGet; } diff --git a/frontend/src/components/endpoints/EndpointList.stories.tsx b/frontend/src/components/endpoints/EndpointList.stories.tsx index e85d606775..61b1f11d3e 100644 --- a/frontend/src/components/endpoints/EndpointList.stories.tsx +++ b/frontend/src/components/endpoints/EndpointList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import Endpoints, { KubeEndpoint } from '../../lib/k8s/endpoints'; import { TestContext } from '../../test'; import { generateK8sResourceList } from '../../test/mocker'; @@ -59,7 +59,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/horizontalPodAutoscaler/HPADetails.stories.tsx b/frontend/src/components/horizontalPodAutoscaler/HPADetails.stories.tsx index ae42e4ecd8..dcc39eeaaa 100644 --- a/frontend/src/components/horizontalPodAutoscaler/HPADetails.stories.tsx +++ b/frontend/src/components/horizontalPodAutoscaler/HPADetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObjectClass } from '../../lib/k8s/cluster'; import { KubeObject } from '../../lib/k8s/cluster'; import Event from '../../lib/k8s/event'; @@ -128,7 +128,7 @@ interface MockerStory { useList?: KubeObjectClass['useList']; } -const Template: Story = (args: MockerStory) => { +const Template: StoryFn = (args: MockerStory) => { if (!!args.useGet) { HPA.useGet = args.useGet; Event.objectEvents = async (obj: KubeObject) => { diff --git a/frontend/src/components/horizontalPodAutoscaler/HPAList.stories.tsx b/frontend/src/components/horizontalPodAutoscaler/HPAList.stories.tsx index 8ac233be68..552394d530 100644 --- a/frontend/src/components/horizontalPodAutoscaler/HPAList.stories.tsx +++ b/frontend/src/components/horizontalPodAutoscaler/HPAList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import HPA, { KubeHPA } from '../../lib/k8s/hpa'; import { TestContext } from '../../test'; import { generateK8sResourceList } from '../../test/mocker'; @@ -128,7 +128,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/ingress/ClassDetails.stories.tsx b/frontend/src/components/ingress/ClassDetails.stories.tsx index 142a534bbe..2aad6bb03b 100644 --- a/frontend/src/components/ingress/ClassDetails.stories.tsx +++ b/frontend/src/components/ingress/ClassDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import IngressClass, { KubeIngressClass } from '../../lib/k8s/ingressClass'; import { TestContext } from '../../test'; import Details from './ClassDetails'; @@ -23,7 +23,7 @@ interface MockerStory { ingressJson?: KubeIngressClass; } -const Template: Story = (args: MockerStory) => { +const Template: StoryFn = (args: MockerStory) => { const { ingressJson } = args; if (!!ingressJson) { IngressClass.useGet = () => [new IngressClass(ingressJson), null, () => {}, () => {}] as any; diff --git a/frontend/src/components/ingress/ClassList.stories.tsx b/frontend/src/components/ingress/ClassList.stories.tsx index 28e963f3e5..8cdd895701 100644 --- a/frontend/src/components/ingress/ClassList.stories.tsx +++ b/frontend/src/components/ingress/ClassList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObject } from '../../lib/k8s/cluster'; import IngressClass from '../../lib/k8s/ingressClass'; import { TestContext } from '../../test'; @@ -28,7 +28,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/ingress/Details.stories.tsx b/frontend/src/components/ingress/Details.stories.tsx index bb85776a30..739ac92b4d 100644 --- a/frontend/src/components/ingress/Details.stories.tsx +++ b/frontend/src/components/ingress/Details.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import Ingress, { KubeIngress } from '../../lib/k8s/ingress'; import { TestContext } from '../../test'; import Details from './Details'; @@ -23,7 +23,7 @@ interface MockerStory { ingressJson?: KubeIngress; } -const Template: Story = (args: MockerStory) => { +const Template: StoryFn = (args: MockerStory) => { const { ingressJson } = args; if (!!ingressJson) { Ingress.useGet = () => [new Ingress(ingressJson), null, () => {}, () => {}] as any; diff --git a/frontend/src/components/ingress/LinkStringFormat.stories.tsx b/frontend/src/components/ingress/LinkStringFormat.stories.tsx index 7875e9e92b..3468cc7592 100644 --- a/frontend/src/components/ingress/LinkStringFormat.stories.tsx +++ b/frontend/src/components/ingress/LinkStringFormat.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import Ingress from '../../lib/k8s/ingress'; import { LinkStringFormat, LinkStringFormatProps } from './Details'; @@ -9,7 +9,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; const noPath = new Ingress({ kind: 'Ingress', diff --git a/frontend/src/components/ingress/List.stories.tsx b/frontend/src/components/ingress/List.stories.tsx index 0d0e13bbf4..186d7a4e0f 100644 --- a/frontend/src/components/ingress/List.stories.tsx +++ b/frontend/src/components/ingress/List.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObject } from '../../lib/k8s/cluster'; import Ingress from '../../lib/k8s/ingress'; import { TestContext } from '../../test'; @@ -26,7 +26,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/job/JobList.stories.tsx b/frontend/src/components/job/JobList.stories.tsx index 7f39fcad38..009ffc9a79 100644 --- a/frontend/src/components/job/JobList.stories.tsx +++ b/frontend/src/components/job/JobList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import Job from '../../lib/k8s/job'; import { TestContext } from '../../test'; import { generateK8sResourceList } from '../../test/mocker'; @@ -54,7 +54,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/limitRange/Details.stories.tsx b/frontend/src/components/limitRange/Details.stories.tsx index fec0243731..1c21684005 100644 --- a/frontend/src/components/limitRange/Details.stories.tsx +++ b/frontend/src/components/limitRange/Details.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { LimitRange } from '../../lib/k8s/limitRange'; import { TestContext } from '../../test'; import { LimitRangeDetails } from './Details'; @@ -22,7 +22,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/limitRange/List.stories.tsx b/frontend/src/components/limitRange/List.stories.tsx index fbad7388b2..a22b2b1cbf 100644 --- a/frontend/src/components/limitRange/List.stories.tsx +++ b/frontend/src/components/limitRange/List.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObject } from '../../lib/k8s/cluster'; import { LimitRange } from '../../lib/k8s/limitRange'; import { TestContext } from '../../test'; @@ -26,7 +26,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/namespace/NamespaceDetails.stories.tsx b/frontend/src/components/namespace/NamespaceDetails.stories.tsx index fdfe402c83..df7bd0987b 100644 --- a/frontend/src/components/namespace/NamespaceDetails.stories.tsx +++ b/frontend/src/components/namespace/NamespaceDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import Namespace, { KubeNamespace } from '../../lib/k8s/namespace'; import { TestContext } from '../../test'; import NamespaceDetails from './Details'; @@ -39,7 +39,7 @@ interface MockerStory { namespace: string; } -const Template: Story = args => { +const Template: StoryFn = args => { const { namespace } = args; return ( diff --git a/frontend/src/components/namespace/NamespaceList.stories.tsx b/frontend/src/components/namespace/NamespaceList.stories.tsx index 93cda71913..0308051765 100644 --- a/frontend/src/components/namespace/NamespaceList.stories.tsx +++ b/frontend/src/components/namespace/NamespaceList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import Namespace, { KubeNamespace } from '../../lib/k8s/namespace'; import { TestContext } from '../../test'; import { generateK8sResourceList } from '../../test/mocker'; @@ -37,7 +37,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/node/List.stories.tsx b/frontend/src/components/node/List.stories.tsx index 9963a73524..9eb7d95631 100644 --- a/frontend/src/components/node/List.stories.tsx +++ b/frontend/src/components/node/List.stories.tsx @@ -1,5 +1,5 @@ import Container from '@mui/material/Container'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import Node from '../../lib/k8s/node'; import { TestContext } from '../../test'; import List from './List'; @@ -162,7 +162,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ( diff --git a/frontend/src/components/pod/PodDetails.stories.tsx b/frontend/src/components/pod/PodDetails.stories.tsx index e5fb2dc58a..dfabdc5078 100644 --- a/frontend/src/components/pod/PodDetails.stories.tsx +++ b/frontend/src/components/pod/PodDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObjectClass } from '../../lib/k8s/cluster'; import Event from '../../lib/k8s/event'; import Pod, { KubePod } from '../../lib/k8s/pod'; @@ -37,7 +37,7 @@ interface MockerStory { podName: string; } -const Template: Story = args => { +const Template: StoryFn = args => { const { useGet, useList, podName, objectEventsFunc } = args; if (!!useGet) { diff --git a/frontend/src/components/pod/PodList.stories.tsx b/frontend/src/components/pod/PodList.stories.tsx index 39723dd93e..561fd5499f 100644 --- a/frontend/src/components/pod/PodList.stories.tsx +++ b/frontend/src/components/pod/PodList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import Pod from '../../lib/k8s/pod'; import { TestContext } from '../../test'; import PodList from './List'; @@ -25,7 +25,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/pod/PodLogs.stories.tsx b/frontend/src/components/pod/PodLogs.stories.tsx index 5218c3983a..2b7e25c705 100644 --- a/frontend/src/components/pod/PodLogs.stories.tsx +++ b/frontend/src/components/pod/PodLogs.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { StreamResultsCb } from '../../lib/k8s/apiProxy'; import { AuthRequestResourceAttrs, KubeObjectClass } from '../../lib/k8s/cluster'; import Pod, { KubePod, LogOptions } from '../../lib/k8s/pod'; @@ -51,7 +51,7 @@ interface MockerStory { [key: string]: Pod[keyof typeof Pod | keyof typeof Pod.prototype]; } -const Template: Story = args => { +const Template: StoryFn = args => { const { podName, detailsProps, ...podProps } = args; for (const key in podProps) { diff --git a/frontend/src/components/pod/podDetailsVolumeSection.stories.tsx b/frontend/src/components/pod/podDetailsVolumeSection.stories.tsx index 077f0b7079..054529dc44 100644 --- a/frontend/src/components/pod/podDetailsVolumeSection.stories.tsx +++ b/frontend/src/components/pod/podDetailsVolumeSection.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { KubeObjectInterface } from '../../lib/k8s/cluster'; import { TestContext } from '../../test'; @@ -125,7 +125,7 @@ export default { ], } as Meta; -const Template: Story = args => { +const Template: StoryFn = args => { return ( diff --git a/frontend/src/components/podDisruptionBudget/pdbDetails.stories.tsx b/frontend/src/components/podDisruptionBudget/pdbDetails.stories.tsx index 2a97dd9b78..28a6a1c5c1 100644 --- a/frontend/src/components/podDisruptionBudget/pdbDetails.stories.tsx +++ b/frontend/src/components/podDisruptionBudget/pdbDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObjectClass } from '../../lib/k8s/cluster'; import { KubeObject } from '../../lib/k8s/cluster'; import Event from '../../lib/k8s/event'; @@ -76,7 +76,7 @@ interface MockerStory { allowEdit?: boolean; } -const Template: Story = (args: MockerStory) => { +const Template: StoryFn = (args: MockerStory) => { if (!!args.useGet) { PDB.useGet = args.useGet; Event.objectEvents = async (obj: KubeObject) => { diff --git a/frontend/src/components/podDisruptionBudget/pdbList.stories.tsx b/frontend/src/components/podDisruptionBudget/pdbList.stories.tsx index bd01c3b194..ae012ce83b 100644 --- a/frontend/src/components/podDisruptionBudget/pdbList.stories.tsx +++ b/frontend/src/components/podDisruptionBudget/pdbList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import PDB, { KubePDB } from '../../lib/k8s/podDisruptionBudget'; import { TestContext } from '../../test'; import { generateK8sResourceList } from '../../test/mocker'; @@ -69,7 +69,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/priorityClass/priorityClassDetails.stories.tsx b/frontend/src/components/priorityClass/priorityClassDetails.stories.tsx index 7a6e11a033..fdae4dc867 100644 --- a/frontend/src/components/priorityClass/priorityClassDetails.stories.tsx +++ b/frontend/src/components/priorityClass/priorityClassDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObject, KubeObjectClass } from '../../lib/k8s/cluster'; import Event from '../../lib/k8s/event'; import PriorityClass, { KubePriorityClass } from '../../lib/k8s/priorityClass'; @@ -49,7 +49,7 @@ interface MockerStory { allowEdit?: boolean; } -const Template: Story = (args: MockerStory) => { +const Template: StoryFn = (args: MockerStory) => { if (!!args.useGet) { PriorityClass.useGet = args.useGet; Event.objectEvents = async (obj: KubeObject) => { diff --git a/frontend/src/components/priorityClass/priorityClassList.stories.tsx b/frontend/src/components/priorityClass/priorityClassList.stories.tsx index 18ac92d185..51a3564661 100644 --- a/frontend/src/components/priorityClass/priorityClassList.stories.tsx +++ b/frontend/src/components/priorityClass/priorityClassList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import PriorityClass, { KubePriorityClass } from '../../lib/k8s/priorityClass'; import { TestContext } from '../../test'; import { generateK8sResourceList } from '../../test/mocker'; @@ -43,7 +43,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/replicaset/List.stories.tsx b/frontend/src/components/replicaset/List.stories.tsx index 6541a23a30..5267d6123a 100644 --- a/frontend/src/components/replicaset/List.stories.tsx +++ b/frontend/src/components/replicaset/List.stories.tsx @@ -1,5 +1,5 @@ import Container from '@mui/material/Container'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import ReplicaSet from '../../lib/k8s/replicaSet'; import { TestContext } from '../../test'; import List from './List'; @@ -236,7 +236,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ( diff --git a/frontend/src/components/resourceQuota/resourceQuotaDetails.stories.tsx b/frontend/src/components/resourceQuota/resourceQuotaDetails.stories.tsx index 1377682f3a..92abf00478 100644 --- a/frontend/src/components/resourceQuota/resourceQuotaDetails.stories.tsx +++ b/frontend/src/components/resourceQuota/resourceQuotaDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObjectClass } from '../../lib/k8s/cluster'; import ResourceQuota, { KubeResourceQuota } from '../../lib/k8s/resourceQuota'; import { TestContext } from '../../test'; @@ -62,7 +62,7 @@ interface MockerStory { allowEdit?: boolean; } -const Template: Story = (args: MockerStory) => { +const Template: StoryFn = (args: MockerStory) => { if (!!args.useGet) { ResourceQuota.useGet = args.useGet; } diff --git a/frontend/src/components/resourceQuota/resourceQuotaList.stories.tsx b/frontend/src/components/resourceQuota/resourceQuotaList.stories.tsx index 067996a6e3..09ec55f2f3 100644 --- a/frontend/src/components/resourceQuota/resourceQuotaList.stories.tsx +++ b/frontend/src/components/resourceQuota/resourceQuotaList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import ResourceQuota, { KubeResourceQuota } from '../../lib/k8s/resourceQuota'; import { TestContext } from '../../test'; import { generateK8sResourceList } from '../../test/mocker'; @@ -57,7 +57,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/storage/ClaimDetails.stories.tsx b/frontend/src/components/storage/ClaimDetails.stories.tsx index 01034a45d4..199ad36445 100644 --- a/frontend/src/components/storage/ClaimDetails.stories.tsx +++ b/frontend/src/components/storage/ClaimDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import PersistentVolumeClaim, { KubePersistentVolumeClaim, } from '../../lib/k8s/persistentVolumeClaim'; @@ -25,7 +25,7 @@ interface MockerStory { json?: KubePersistentVolumeClaim; } -const Template: Story = (args: MockerStory) => { +const Template: StoryFn = (args: MockerStory) => { const { json } = args; if (!!json) { PersistentVolumeClaim.useGet = () => diff --git a/frontend/src/components/storage/ClaimList.stories.tsx b/frontend/src/components/storage/ClaimList.stories.tsx index 61a004040d..1e23d36d11 100644 --- a/frontend/src/components/storage/ClaimList.stories.tsx +++ b/frontend/src/components/storage/ClaimList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import _ from 'lodash'; import PersistentVolumeClaim, { KubePersistentVolumeClaim, @@ -45,7 +45,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/storage/ClassDetails.stories.tsx b/frontend/src/components/storage/ClassDetails.stories.tsx index 1e5633219f..6d03ba2d98 100644 --- a/frontend/src/components/storage/ClassDetails.stories.tsx +++ b/frontend/src/components/storage/ClassDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import StorageClass, { KubeStorageClass } from '../../lib/k8s/storageClass'; import { TestContext } from '../../test'; import Details from './ClaimDetails'; @@ -23,7 +23,7 @@ interface MockerStory { json?: KubeStorageClass; } -const Template: Story = (args: MockerStory) => { +const Template: StoryFn = (args: MockerStory) => { const { json } = args; if (!!json) { StorageClass.useGet = () => [new StorageClass(json), null, () => {}, () => {}] as any; diff --git a/frontend/src/components/storage/ClassList.stories.tsx b/frontend/src/components/storage/ClassList.stories.tsx index f084870815..c62bbf574f 100644 --- a/frontend/src/components/storage/ClassList.stories.tsx +++ b/frontend/src/components/storage/ClassList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObject } from '../../lib/k8s/cluster'; import StorageClass from '../../lib/k8s/storageClass'; import { TestContext } from '../../test'; @@ -26,7 +26,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/storage/VolumeDetails.stories.tsx b/frontend/src/components/storage/VolumeDetails.stories.tsx index 0a0377d275..8427ae1dda 100644 --- a/frontend/src/components/storage/VolumeDetails.stories.tsx +++ b/frontend/src/components/storage/VolumeDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import PersistentVolume, { KubePersistentVolume } from '../../lib/k8s/persistentVolume'; import { TestContext } from '../../test'; import Details from './ClaimDetails'; @@ -23,7 +23,7 @@ interface MockerStory { json?: KubePersistentVolume; } -const Template: Story = (args: MockerStory) => { +const Template: StoryFn = (args: MockerStory) => { const { json } = args; if (!!json) { PersistentVolume.useGet = () => [new PersistentVolume(json), null, () => {}, () => {}] as any; diff --git a/frontend/src/components/storage/VolumeList.stories.tsx b/frontend/src/components/storage/VolumeList.stories.tsx index 58b15a53a1..9e783206f7 100644 --- a/frontend/src/components/storage/VolumeList.stories.tsx +++ b/frontend/src/components/storage/VolumeList.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import { KubeObject } from '../../lib/k8s/cluster'; import PersistentVolume from '../../lib/k8s/persistentVolume'; import { TestContext } from '../../test'; @@ -26,7 +26,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ; }; diff --git a/frontend/src/components/webhookconfiguration/MutatingWebhookConfigDetails.stories.tsx b/frontend/src/components/webhookconfiguration/MutatingWebhookConfigDetails.stories.tsx index e618b9fab9..d56354a720 100644 --- a/frontend/src/components/webhookconfiguration/MutatingWebhookConfigDetails.stories.tsx +++ b/frontend/src/components/webhookconfiguration/MutatingWebhookConfigDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import MWC, { KubeMutatingWebhookConfiguration } from '../../lib/k8s/mutatingWebhookConfiguration'; import { TestContext } from '../../test'; import MutatingWebhookConfigDetails from './MutatingWebhookConfigDetails'; @@ -23,7 +23,7 @@ interface MockerStory { withService: boolean; } -const Template: Story = args => { +const Template: StoryFn = args => { const { withService } = args; MWC.useGet = () => usePhonyGet(withService); diff --git a/frontend/src/components/webhookconfiguration/MutatingWebhookConfigList.stories.tsx b/frontend/src/components/webhookconfiguration/MutatingWebhookConfigList.stories.tsx index e6690df6ac..0bdf5421e3 100644 --- a/frontend/src/components/webhookconfiguration/MutatingWebhookConfigList.stories.tsx +++ b/frontend/src/components/webhookconfiguration/MutatingWebhookConfigList.stories.tsx @@ -1,5 +1,5 @@ import Container from '@mui/material/Container'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import MutatingWebhookConfiguration from '../../lib/k8s/mutatingWebhookConfiguration'; import { TestContext } from '../../test'; import { generateK8sResourceList } from '../../test/mocker'; @@ -40,7 +40,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ( diff --git a/frontend/src/components/webhookconfiguration/ValidatingWebhookConfigDetails.stories.tsx b/frontend/src/components/webhookconfiguration/ValidatingWebhookConfigDetails.stories.tsx index da6a6bbba5..a276c20bc4 100644 --- a/frontend/src/components/webhookconfiguration/ValidatingWebhookConfigDetails.stories.tsx +++ b/frontend/src/components/webhookconfiguration/ValidatingWebhookConfigDetails.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import VWC, { KubeValidatingWebhookConfiguration, } from '../../lib/k8s/validatingWebhookConfiguration'; @@ -25,7 +25,7 @@ interface MockerStory { withService: boolean; } -const Template: Story = args => { +const Template: StoryFn = args => { const { withService } = args; VWC.useGet = () => usePhonyGet(withService); diff --git a/frontend/src/components/webhookconfiguration/ValidatingWebhookConfigList.stories.tsx b/frontend/src/components/webhookconfiguration/ValidatingWebhookConfigList.stories.tsx index d3272e3e5d..843d965394 100644 --- a/frontend/src/components/webhookconfiguration/ValidatingWebhookConfigList.stories.tsx +++ b/frontend/src/components/webhookconfiguration/ValidatingWebhookConfigList.stories.tsx @@ -1,5 +1,5 @@ import Container from '@mui/material/Container'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import ValidatingWebhookConfiguration from '../../lib/k8s/validatingWebhookConfiguration'; import { TestContext } from '../../test'; import { generateK8sResourceList } from '../../test/mocker'; @@ -40,7 +40,7 @@ export default { ], } as Meta; -const Template: Story = () => { +const Template: StoryFn = () => { return ( diff --git a/frontend/src/i18n/LocaleSelect/LocaleSelect.stories.tsx b/frontend/src/i18n/LocaleSelect/LocaleSelect.stories.tsx index a9a8118067..db6358ac00 100644 --- a/frontend/src/i18n/LocaleSelect/LocaleSelect.stories.tsx +++ b/frontend/src/i18n/LocaleSelect/LocaleSelect.stories.tsx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import LocaleSelect, { LocaleSelectProps } from './LocaleSelect'; @@ -8,7 +8,7 @@ export default { argTypes: {}, } as Meta; -const Template: Story = args => ; +const Template: StoryFn = args => ; export const Initial = Template.bind({}); Initial.args = {};