From c3b67fbca628804b95d3751a9ab43eab659fb0c9 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 6 Sep 2021 12:27:46 +0300 Subject: [PATCH] [refactor] GH-14 Move renderers to templates --- stories/DataRenderer.stories.tsx | 3 +-- stories/DenormalizedObservations.stories.tsx | 3 +-- stories/GroupedBoxPlot.stories.tsx | 3 +-- stories/RemoteBoxPlot.stories.tsx | 3 +-- stories/RemoteDataRenderer.stories.tsx | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/stories/DataRenderer.stories.tsx b/stories/DataRenderer.stories.tsx index e040cb5..ea61d63 100644 --- a/stories/DataRenderer.stories.tsx +++ b/stories/DataRenderer.stories.tsx @@ -24,14 +24,13 @@ import { additionalCollsLocal, localChartsViewDescrs } from '../src/store/data'; import { MstBoxPlotChartVKElement, MstTimeSeriesChartVKElement } from '../src/store/MstViewElements'; import { boxPlotBucketShape, observationShape } from '../src/store/shapes'; -const renderers = [...chartsRenderers]; - export default { title: 'DataRenderer', component: Form, } as Meta; const Template: Story = (args: any) => { + const renderers = [...chartsRenderers]; registerMstViewKindSchema(MstTimeSeriesChartVKElement); registerMstViewKindSchema(MstBoxPlotChartVKElement); diff --git a/stories/DenormalizedObservations.stories.tsx b/stories/DenormalizedObservations.stories.tsx index fa3cb56..fef60c8 100644 --- a/stories/DenormalizedObservations.stories.tsx +++ b/stories/DenormalizedObservations.stories.tsx @@ -24,14 +24,13 @@ import { chartsRenderers } from '../src'; import { additionalColls, denormalizedObservationsViewDescrs } from '../src/store/DenormalizedObservationsData'; import { MstBoxPlotChartVKElement, MstTimeSeriesChartVKElement } from '../src/store/MstViewElements'; -const renderers = [...antdLayoutRenderers, ...chartsRenderers]; - export default { title: 'DenormalizedObservations', component: Form, } as Meta; const Template: Story = (args: any) => { + const renderers = [...antdLayoutRenderers, ...chartsRenderers]; registerMstViewKindSchema(MstTimeSeriesChartVKElement); registerMstViewKindSchema(MstBoxPlotChartVKElement); diff --git a/stories/GroupedBoxPlot.stories.tsx b/stories/GroupedBoxPlot.stories.tsx index b2afa56..ba6a58b 100644 --- a/stories/GroupedBoxPlot.stories.tsx +++ b/stories/GroupedBoxPlot.stories.tsx @@ -24,14 +24,13 @@ import { additionalCollsLocal, localChartsViewDescrs } from '../src/store/data'; import { MstBoxPlotChartVKElement, MstTimeSeriesChartVKElement } from '../src/store/MstViewElements'; import { boxPlotBucketShape, observationShape } from '../src/store/shapes'; -const renderers = [...chartsRenderers]; - export default { title: 'GroupedBoxPlot', component: Form, } as Meta; const Template: Story = (args: any) => { + const renderers = [...chartsRenderers]; registerMstViewKindSchema(MstTimeSeriesChartVKElement); registerMstViewKindSchema(MstBoxPlotChartVKElement); diff --git a/stories/RemoteBoxPlot.stories.tsx b/stories/RemoteBoxPlot.stories.tsx index df53f0e..27bbd3d 100644 --- a/stories/RemoteBoxPlot.stories.tsx +++ b/stories/RemoteBoxPlot.stories.tsx @@ -23,14 +23,13 @@ import { chartsRenderers } from '../src'; import { MstBoxPlotChartVKElement, MstTimeSeriesChartVKElement } from '../src/store/MstViewElements'; import { additionalBoxplotColls, remoteBoxPlotViewDescrs } from '../src/store/RemoteBoxPlot'; -const renderers = [...chartsRenderers]; - export default { title: 'RemoteBoxPlot', component: Form, } as Meta; const Template: Story = (args: any) => { + const renderers = [...chartsRenderers]; registerMstViewKindSchema(MstTimeSeriesChartVKElement); registerMstViewKindSchema(MstBoxPlotChartVKElement); diff --git a/stories/RemoteDataRenderer.stories.tsx b/stories/RemoteDataRenderer.stories.tsx index 1baee06..0f5bbd5 100644 --- a/stories/RemoteDataRenderer.stories.tsx +++ b/stories/RemoteDataRenderer.stories.tsx @@ -23,14 +23,13 @@ import { chartsRenderers } from '../src'; import { MstBoxPlotChartVKElement, MstTimeSeriesChartVKElement } from '../src/store/MstViewElements'; import { additionalColls, timeSeriesViewDescrs } from '../src/store/RemoteData'; -const renderers = [...chartsRenderers]; - export default { title: 'RemoteDataRenderer', component: Form, } as Meta; const Template: Story = (args: any) => { + const renderers = [...chartsRenderers]; registerMstViewKindSchema(MstTimeSeriesChartVKElement); registerMstViewKindSchema(MstBoxPlotChartVKElement);