From 004b35b785d27ad919271323b3b9deef2c3289a4 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 | 4 ++-- .../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 | 4 ++-- .../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 | 2 +- .../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 | 2 +- .../components/endpoints/EndpointDetails.stories.tsx | 2 +- .../src/components/endpoints/EndpointList.stories.tsx | 2 +- .../horizontalPodAutoscaler/HPADetails.stories.tsx | 2 +- .../horizontalPodAutoscaler/HPAList.stories.tsx | 2 +- .../src/components/ingress/ClassDetails.stories.tsx | 2 +- frontend/src/components/ingress/ClassList.stories.tsx | 2 +- frontend/src/components/ingress/Details.stories.tsx | 2 +- .../components/ingress/LinkStringFormat.stories.tsx | 4 ++-- frontend/src/components/ingress/List.stories.tsx | 2 +- frontend/src/components/job/JobList.stories.tsx | 2 +- frontend/src/components/limitRange/Details.stories.tsx | 2 +- frontend/src/components/limitRange/List.stories.tsx | 2 +- .../components/namespace/NamespaceDetails.stories.tsx | 4 ++-- .../src/components/namespace/NamespaceList.stories.tsx | 2 +- frontend/src/components/node/List.stories.tsx | 2 +- frontend/src/components/pod/PodDetails.stories.tsx | 4 ++-- frontend/src/components/pod/PodList.stories.tsx | 2 +- frontend/src/components/pod/PodLogs.stories.tsx | 4 ++-- .../components/pod/podDetailsVolumeSection.stories.tsx | 4 ++-- .../podDisruptionBudget/pdbDetails.stories.tsx | 2 +- .../components/podDisruptionBudget/pdbList.stories.tsx | 2 +- .../priorityClass/priorityClassDetails.stories.tsx | 2 +- .../priorityClass/priorityClassList.stories.tsx | 2 +- frontend/src/components/replicaset/List.stories.tsx | 2 +- .../resourceQuota/resourceQuotaDetails.stories.tsx | 2 +- .../resourceQuota/resourceQuotaList.stories.tsx | 2 +- .../src/components/storage/ClaimDetails.stories.tsx | 2 +- frontend/src/components/storage/ClaimList.stories.tsx | 2 +- .../src/components/storage/ClassDetails.stories.tsx | 2 +- frontend/src/components/storage/ClassList.stories.tsx | 2 +- .../src/components/storage/VolumeDetails.stories.tsx | 2 +- frontend/src/components/storage/VolumeList.stories.tsx | 2 +- .../MutatingWebhookConfigDetails.stories.tsx | 4 ++-- .../MutatingWebhookConfigList.stories.tsx | 2 +- .../ValidatingWebhookConfigDetails.stories.tsx | 4 ++-- .../ValidatingWebhookConfigList.stories.tsx | 2 +- .../src/i18n/LocaleSelect/LocaleSelect.stories.tsx | 4 ++-- 67 files changed, 106 insertions(+), 106 deletions(-) diff --git a/frontend/src/components/App/PluginSettings/PluginSettingsDetails.stories.tsx b/frontend/src/components/App/PluginSettings/PluginSettingsDetails.stories.tsx index 8ac35ff2355..17cbb27dafb 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,7 +64,7 @@ const mockConfig = { name: 'mockPlugin', }; -const Template: Story = (args: PluginSettingsDetailsPureProps) => ( +const Template: StoryFn = (args: PluginSettingsDetailsPureProps) => ( ); diff --git a/frontend/src/components/DetailsViewSection/DetailsViewSection.stories.tsx b/frontend/src/components/DetailsViewSection/DetailsViewSection.stories.tsx index 0ec1a2246ae..639fc678a50 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 1f0b228bba4..434b86a0df0 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 77a363f4e4e..89e8b464165 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 9ed739c2307..60769bece65 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 8a2acca8a34..bc768d1a472 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 087acd3d36a..82cff371350 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 a82f273a316..47b2be2325c 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 fa6358c9d23..eafe7e365a8 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 eb93d281214..3ea02522117 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,7 @@ 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 26ee169ce8e..3ee93595346 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 fd37e93e724..53a0fc122d7 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 ba400e9a8b7..54aeb0975e0 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 5ddc0b3ecf6..24399fa6e51 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 6a4e640168a..69f33aa2296 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 2cf893e5f7f..2c5aaa908f4 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'; diff --git a/frontend/src/components/common/Resource/ResourceTable.stories.tsx b/frontend/src/components/common/Resource/ResourceTable.stories.tsx index 763aca82d73..76ffc866872 100644 --- a/frontend/src/components/common/Resource/ResourceTable.stories.tsx +++ b/frontend/src/components/common/Resource/ResourceTable.stories.tsx @@ -1,5 +1,5 @@ import { configureStore } from '@reduxjs/toolkit'; -import { Meta, Story } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import Pod, { KubePod } from '../../../lib/k8s/pod'; import { INITIAL_STATE as UI_INITIAL_STATE } from '../../../redux/reducers/ui'; import { TestContext } from '../../../test'; @@ -11,7 +11,7 @@ export default { argTypes: {}, } as Meta; -const TemplateWithFilter: Story<{ +const TemplateWithFilter: StoryFn<{ resourceTableArgs: ResourceTableFromResourceClassProps; 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 b623aed1388..c7210615dec 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 b46a419773e..e002a6face3 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 22e34e3415d..c7140904ef7 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 df5e1ba5d44..23160b390a4 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 90307abde1c..115520e6f9f 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 f34e0f47709..8588d4b4caf 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 85734b93f07..50b62a4cd46 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 caa560e2148..c76977a0143 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 707a48eaba2..69346d6673d 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 f0dc3a9a68c..d13f82c8982 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 43886d0b3ea..9908c5280fd 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 720fd406e62..0c15d27f30f 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'; diff --git a/frontend/src/components/endpoints/EndpointDetails.stories.tsx b/frontend/src/components/endpoints/EndpointDetails.stories.tsx index 67f99d429f3..9702065d45b 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'; diff --git a/frontend/src/components/endpoints/EndpointList.stories.tsx b/frontend/src/components/endpoints/EndpointList.stories.tsx index e85d606775c..0d7bd9e54d6 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'; diff --git a/frontend/src/components/horizontalPodAutoscaler/HPADetails.stories.tsx b/frontend/src/components/horizontalPodAutoscaler/HPADetails.stories.tsx index ae42e4ecd85..4913fc0f900 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'; diff --git a/frontend/src/components/horizontalPodAutoscaler/HPAList.stories.tsx b/frontend/src/components/horizontalPodAutoscaler/HPAList.stories.tsx index 8ac233be68d..c50fd3c4cb4 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'; diff --git a/frontend/src/components/ingress/ClassDetails.stories.tsx b/frontend/src/components/ingress/ClassDetails.stories.tsx index 142a534bbe7..c5eb8ebbc54 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'; diff --git a/frontend/src/components/ingress/ClassList.stories.tsx b/frontend/src/components/ingress/ClassList.stories.tsx index 28e963f3e5f..b0292887c00 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'; diff --git a/frontend/src/components/ingress/Details.stories.tsx b/frontend/src/components/ingress/Details.stories.tsx index bb85776a309..9f7980a128e 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'; diff --git a/frontend/src/components/ingress/LinkStringFormat.stories.tsx b/frontend/src/components/ingress/LinkStringFormat.stories.tsx index 7875e9e92bc..3468cc7592b 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 0d0e13bbf4c..7c66548495b 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'; diff --git a/frontend/src/components/job/JobList.stories.tsx b/frontend/src/components/job/JobList.stories.tsx index 7f39fcad381..ccc0e9289ff 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'; diff --git a/frontend/src/components/limitRange/Details.stories.tsx b/frontend/src/components/limitRange/Details.stories.tsx index fec02437312..f07e21add77 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'; diff --git a/frontend/src/components/limitRange/List.stories.tsx b/frontend/src/components/limitRange/List.stories.tsx index fbad7388b25..63cf7b86dc5 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'; diff --git a/frontend/src/components/namespace/NamespaceDetails.stories.tsx b/frontend/src/components/namespace/NamespaceDetails.stories.tsx index fdfe402c83e..df7bd0987be 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 93cda719134..f99a4b69425 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'; diff --git a/frontend/src/components/node/List.stories.tsx b/frontend/src/components/node/List.stories.tsx index 9963a73524d..e72f3cc0c6f 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'; diff --git a/frontend/src/components/pod/PodDetails.stories.tsx b/frontend/src/components/pod/PodDetails.stories.tsx index e5fb2dc58a1..dfabdc50788 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 39723dd93e4..5eaa7ecf40d 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'; diff --git a/frontend/src/components/pod/PodLogs.stories.tsx b/frontend/src/components/pod/PodLogs.stories.tsx index 5218c3983a4..2b7e25c705d 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 077f0b70796..054529dc44d 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 2a97dd9b781..9e18f444ed3 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'; diff --git a/frontend/src/components/podDisruptionBudget/pdbList.stories.tsx b/frontend/src/components/podDisruptionBudget/pdbList.stories.tsx index bd01c3b1948..3a67cc942cd 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'; diff --git a/frontend/src/components/priorityClass/priorityClassDetails.stories.tsx b/frontend/src/components/priorityClass/priorityClassDetails.stories.tsx index 7a6e11a0330..a6ef4d0f6da 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'; diff --git a/frontend/src/components/priorityClass/priorityClassList.stories.tsx b/frontend/src/components/priorityClass/priorityClassList.stories.tsx index 18ac92d1858..5230ea9ff23 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'; diff --git a/frontend/src/components/replicaset/List.stories.tsx b/frontend/src/components/replicaset/List.stories.tsx index 6541a23a30c..060d36eb7e5 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'; diff --git a/frontend/src/components/resourceQuota/resourceQuotaDetails.stories.tsx b/frontend/src/components/resourceQuota/resourceQuotaDetails.stories.tsx index 1377682f3a0..208c51e9c91 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'; diff --git a/frontend/src/components/resourceQuota/resourceQuotaList.stories.tsx b/frontend/src/components/resourceQuota/resourceQuotaList.stories.tsx index 067996a6e36..9227230a200 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'; diff --git a/frontend/src/components/storage/ClaimDetails.stories.tsx b/frontend/src/components/storage/ClaimDetails.stories.tsx index 01034a45d4a..3a9ab06d0ea 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'; diff --git a/frontend/src/components/storage/ClaimList.stories.tsx b/frontend/src/components/storage/ClaimList.stories.tsx index 61a004040d9..37587dd9149 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, diff --git a/frontend/src/components/storage/ClassDetails.stories.tsx b/frontend/src/components/storage/ClassDetails.stories.tsx index 1e5633219f0..c974d59d6dc 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'; diff --git a/frontend/src/components/storage/ClassList.stories.tsx b/frontend/src/components/storage/ClassList.stories.tsx index f084870815a..2eeb0966fba 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'; diff --git a/frontend/src/components/storage/VolumeDetails.stories.tsx b/frontend/src/components/storage/VolumeDetails.stories.tsx index 0a0377d275c..8b8beccb56e 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'; diff --git a/frontend/src/components/storage/VolumeList.stories.tsx b/frontend/src/components/storage/VolumeList.stories.tsx index 58b15a53a1b..18ccab0e573 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'; diff --git a/frontend/src/components/webhookconfiguration/MutatingWebhookConfigDetails.stories.tsx b/frontend/src/components/webhookconfiguration/MutatingWebhookConfigDetails.stories.tsx index e618b9fab92..d56354a7205 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 e6690df6ac7..81b1bf34f18 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'; diff --git a/frontend/src/components/webhookconfiguration/ValidatingWebhookConfigDetails.stories.tsx b/frontend/src/components/webhookconfiguration/ValidatingWebhookConfigDetails.stories.tsx index da6a6bbba5b..a276c20bc49 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 d3272e3e5dc..338a1e8f5c3 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'; diff --git a/frontend/src/i18n/LocaleSelect/LocaleSelect.stories.tsx b/frontend/src/i18n/LocaleSelect/LocaleSelect.stories.tsx index a9a8118067c..db6358ac00c 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 = {};