From 9543df1cad95db6bd40349b164b113969a542059 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 13 Feb 2023 11:40:42 +0100 Subject: [PATCH] Change template Stories to make them compatible with excludeDecorators docs parameter --- code/addons/controls/template/stories/basics.stories.ts | 5 ++--- code/addons/controls/template/stories/conditional.stories.ts | 5 ++--- code/addons/controls/template/stories/disable.stories.ts | 5 ++--- code/addons/controls/template/stories/filters.stories.ts | 5 ++--- code/addons/controls/template/stories/issues.stories.ts | 5 ++--- code/addons/controls/template/stories/matchers.stories.ts | 5 ++--- code/addons/controls/template/stories/sorting.stories.ts | 5 ++--- 7 files changed, 14 insertions(+), 21 deletions(-) diff --git a/code/addons/controls/template/stories/basics.stories.ts b/code/addons/controls/template/stories/basics.stories.ts index 8b7bbebe665..51acda9c1f2 100644 --- a/code/addons/controls/template/stories/basics.stories.ts +++ b/code/addons/controls/template/stories/basics.stories.ts @@ -2,10 +2,9 @@ import { global as globalThis } from '@storybook/global'; import type { PartialStoryFn, StoryContext } from '@storybook/types'; export default { - component: null, + component: globalThis.Components.Pre, decorators: [ - (storyFn: PartialStoryFn, context: StoryContext) => - storyFn({ component: globalThis.Components.Pre, args: { object: context.args } }), + (storyFn: PartialStoryFn, context: StoryContext) => storyFn({ args: { object: context.args } }), ], argTypes: { boolean: { control: 'boolean' }, diff --git a/code/addons/controls/template/stories/conditional.stories.ts b/code/addons/controls/template/stories/conditional.stories.ts index 7df82610f16..8d8677f33e6 100644 --- a/code/addons/controls/template/stories/conditional.stories.ts +++ b/code/addons/controls/template/stories/conditional.stories.ts @@ -2,10 +2,9 @@ import { global as globalThis } from '@storybook/global'; import type { PartialStoryFn, StoryContext } from '@storybook/types'; export default { - component: null, + component: globalThis.Components.Pre, decorators: [ - (storyFn: PartialStoryFn, context: StoryContext) => - storyFn({ component: globalThis.Components.Pre, args: { object: context.args } }), + (storyFn: PartialStoryFn, context: StoryContext) => storyFn({ args: { object: context.args } }), ], }; diff --git a/code/addons/controls/template/stories/disable.stories.ts b/code/addons/controls/template/stories/disable.stories.ts index 3d717eca352..bcc53c87612 100644 --- a/code/addons/controls/template/stories/disable.stories.ts +++ b/code/addons/controls/template/stories/disable.stories.ts @@ -2,10 +2,9 @@ import { global as globalThis } from '@storybook/global'; import type { PartialStoryFn, StoryContext } from '@storybook/types'; export default { - component: null, + component: globalThis.Components.Pre, decorators: [ - (storyFn: PartialStoryFn, context: StoryContext) => - storyFn({ component: globalThis.Components.Pre, args: { object: context.args } }), + (storyFn: PartialStoryFn, context: StoryContext) => storyFn({ args: { object: context.args } }), ], }; diff --git a/code/addons/controls/template/stories/filters.stories.ts b/code/addons/controls/template/stories/filters.stories.ts index 4bc7904aa89..8aa860e77b8 100644 --- a/code/addons/controls/template/stories/filters.stories.ts +++ b/code/addons/controls/template/stories/filters.stories.ts @@ -2,10 +2,9 @@ import { global as globalThis } from '@storybook/global'; import type { PartialStoryFn, StoryContext } from '@storybook/types'; export default { - component: null, + component: globalThis.Components.Pre, decorators: [ - (storyFn: PartialStoryFn, context: StoryContext) => - storyFn({ component: globalThis.Components.Pre, args: { object: context.args } }), + (storyFn: PartialStoryFn, context: StoryContext) => storyFn({ args: { object: context.args } }), ], args: { helloWorld: 1, diff --git a/code/addons/controls/template/stories/issues.stories.ts b/code/addons/controls/template/stories/issues.stories.ts index 462718633c1..d3827f766d6 100644 --- a/code/addons/controls/template/stories/issues.stories.ts +++ b/code/addons/controls/template/stories/issues.stories.ts @@ -2,10 +2,9 @@ import { global as globalThis } from '@storybook/global'; import type { PartialStoryFn, StoryContext } from '@storybook/types'; export default { - component: null, + component: globalThis.Components.Pre, decorators: [ - (storyFn: PartialStoryFn, context: StoryContext) => - storyFn({ component: globalThis.Components.Pre, args: { object: context.args } }), + (storyFn: PartialStoryFn, context: StoryContext) => storyFn({ args: { object: context.args } }), ], }; diff --git a/code/addons/controls/template/stories/matchers.stories.ts b/code/addons/controls/template/stories/matchers.stories.ts index 266debeff71..0582447362a 100644 --- a/code/addons/controls/template/stories/matchers.stories.ts +++ b/code/addons/controls/template/stories/matchers.stories.ts @@ -2,10 +2,9 @@ import { global as globalThis } from '@storybook/global'; import type { PartialStoryFn, StoryContext } from '@storybook/types'; export default { - component: null, + component: globalThis.Components.Pre, decorators: [ - (storyFn: PartialStoryFn, context: StoryContext) => - storyFn({ component: globalThis.Components.Pre, args: { object: context.args } }), + (storyFn: PartialStoryFn, context: StoryContext) => storyFn({ args: { object: context.args } }), ], }; diff --git a/code/addons/controls/template/stories/sorting.stories.ts b/code/addons/controls/template/stories/sorting.stories.ts index fad557c3ee4..573f11a2bb3 100644 --- a/code/addons/controls/template/stories/sorting.stories.ts +++ b/code/addons/controls/template/stories/sorting.stories.ts @@ -2,10 +2,9 @@ import { global as globalThis } from '@storybook/global'; import type { PartialStoryFn, StoryContext } from '@storybook/types'; export default { - component: null, + component: globalThis.Components.Pre, decorators: [ - (storyFn: PartialStoryFn, context: StoryContext) => - storyFn({ component: globalThis.Components.Pre, args: { object: context.args } }), + (storyFn: PartialStoryFn, context: StoryContext) => storyFn({ args: { object: context.args } }), ], argTypes: { x: { type: { required: true } },