Skip to content

Commit

Permalink
Merge pull request #21845 from storybookjs/chore_update_7_0_refs_temp…
Browse files Browse the repository at this point in the history
…lates

Chore: (Templates) Updates code references to 7.0
  • Loading branch information
kylegach authored and shilman committed Apr 6, 2023
1 parent a967fe8 commit 1415453
Show file tree
Hide file tree
Showing 65 changed files with 128 additions and 128 deletions.
2 changes: 1 addition & 1 deletion code/addons/gfm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const mdxLoaderOptions = async (config: any) => {
deprecate(dedent`
The "@storybook/addon-mdx-gfm" addon is meant as a migration assistant for Storybook 7.0; and will likely be removed in a future version.
It's recommended you read this document:
https://storybook.js.org/docs/7.0/react/writing-docs/mdx#lack-of-github-flavored-markdown-gfm
https://storybook.js.org/docs/react/writing-docs/mdx#lack-of-github-flavored-markdown-gfm
Once you've made the necessary changes, you can remove the addon from your package.json and storybook config.
`);
4 changes: 2 additions & 2 deletions code/frameworks/angular/template/cli/Button.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Meta, StoryObj } from '@storybook/angular';
import Button from './button.component';

// More on how to set up stories at: https://storybook.js.org/docs/7.0/angular/writing-stories/introduction
// More on how to set up stories at: https://storybook.js.org/docs/angular/writing-stories/introduction
const meta: Meta<Button> = {
title: 'Example/Button',
component: Button,
Expand All @@ -22,7 +22,7 @@ const meta: Meta<Button> = {
export default meta;
type Story = StoryObj<Button>;

// More on writing stories with args: https://storybook.js.org/docs/7.0/angular/writing-stories/args
// More on writing stories with args: https://storybook.js.org/docs/angular/writing-stories/args
export const Primary: Story = {
args: {
primary: true,
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/angular/template/cli/Header.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Header from './header.component';
const meta: Meta<Header> = {
title: 'Example/Header',
component: Header,
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/angular/writing-docs/docs-page
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/angular/writing-docs/autodocs
tags: ['autodocs'],
render: (args) => ({ props: args }),
decorators: [
Expand All @@ -18,7 +18,7 @@ const meta: Meta<Header> = {
}),
],
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/angular/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/angular/configure/story-layout
layout: 'fullscreen',
},
};
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/angular/template/cli/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const meta: Meta<Page> = {
title: 'Example/Page',
component: Page,
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/angular/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/angular/configure/story-layout
layout: 'fullscreen',
},
decorators: [
Expand All @@ -31,7 +31,7 @@ export const LoggedOut: Story = {
}),
};

// More on interaction testing: https://storybook.js.org/docs/7.0/angular/writing-tests/interaction-testing
// More on interaction testing: https://storybook.js.org/docs/angular/writing-tests/interaction-testing
export const LoggedIn: Story = {
render: (args: Page) => ({
props: args,
Expand Down
6 changes: 3 additions & 3 deletions code/frameworks/ember/template/cli/Button.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';

// More on how to set up stories at: https://storybook.js.org/docs/7.0/ember/writing-stories/introduction
// More on how to set up stories at: https://storybook.js.org/docs/ember/writing-stories/introduction
export default {
title: 'Example/Button',
render: (args) => ({
Expand All @@ -12,11 +12,11 @@ export default {
argTypes: {
label: { control: 'text' },
},
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/react/writing-docs/docs-page
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
tags: ['autodocs'],
};

// More on writing stories with args: https://storybook.js.org/docs/7.0/ember/writing-stories/args
// More on writing stories with args: https://storybook.js.org/docs/ember/writing-stories/args
export const Text = {
args: {
label: 'Button',
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/template/cli/js/Button.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button } from './Button';

// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
export default {
title: 'Example/Button',
component: Button,
Expand All @@ -12,7 +12,7 @@ export default {
},
};

// More on writing stories with args: https://storybook.js.org/docs/7.0/react/writing-stories/args
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const Primary = {
args: {
primary: true,
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/template/cli/js/Header.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Header } from './Header';
export default {
title: 'Example/Header',
component: Header,
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/react/writing-docs/docs-page
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
tags: ['autodocs'],
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
layout: 'fullscreen',
},
};
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/template/cli/js/Page.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ export default {
title: 'Example/Page',
component: Page,
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
layout: 'fullscreen',
},
};

export const LoggedOut = {};

// More on interaction testing: https://storybook.js.org/docs/7.0/react/writing-tests/interaction-testing
// More on interaction testing: https://storybook.js.org/docs/react/writing-tests/interaction-testing
export const LoggedIn = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/template/cli/ts-3-8/Button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';

import { Button } from './Button';

// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof Button> = {
title: 'Example/Button',
component: Button,
Expand All @@ -17,7 +17,7 @@ const meta: Meta<typeof Button> = {
export default meta;
type Story = StoryObj<typeof Button>;

// More on writing stories with args: https://storybook.js.org/docs/7.0/react/writing-stories/args
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const Primary: Story = {
args: {
primary: true,
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/template/cli/ts-3-8/Header.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { Header } from './Header';
const meta: Meta<typeof Header> = {
title: 'Example/Header',
component: Header,
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/react/writing-docs/docs-page
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
tags: ['autodocs'],
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
layout: 'fullscreen',
},
};
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/template/cli/ts-3-8/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const meta: Meta<typeof Page> = {
title: 'Example/Page',
component: Page,
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
layout: 'fullscreen',
},
};
Expand All @@ -17,7 +17,7 @@ type Story = StoryObj<typeof Page>;

export const LoggedOut: Story = {};

// More on interaction testing: https://storybook.js.org/docs/7.0/react/writing-tests/interaction-testing
// More on interaction testing: https://storybook.js.org/docs/react/writing-tests/interaction-testing
export const LoggedIn: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/template/cli/ts/Button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';

import { Button } from './Button';

// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof Button> = {
title: 'Example/Button',
component: Button,
Expand All @@ -17,7 +17,7 @@ const meta: Meta<typeof Button> = {
export default meta;
type Story = StoryObj<typeof Button>;

// More on writing stories with args: https://storybook.js.org/docs/7.0/react/writing-stories/args
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const Primary: Story = {
args: {
primary: true,
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/template/cli/ts/Header.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { Header } from './Header';
const meta: Meta<typeof Header> = {
title: 'Example/Header',
component: Header,
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/react/writing-docs/docs-page
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
tags: ['autodocs'],
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
layout: 'fullscreen',
},
};
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/template/cli/ts/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const meta: Meta<typeof Page> = {
title: 'Example/Page',
component: Page,
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
layout: 'fullscreen',
},
};
Expand All @@ -17,7 +17,7 @@ type Story = StoryObj<typeof Page>;

export const LoggedOut: Story = {};

// More on interaction testing: https://storybook.js.org/docs/7.0/react/writing-tests/interaction-testing
// More on interaction testing: https://storybook.js.org/docs/react/writing-tests/interaction-testing
export const LoggedIn: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/automigrate/fixes/mdx-gfm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const mdxgfm: Fix<Options> = {
Storybook 7.0 uses MDX2 for compiling MDX, and thus no longer supports GFM out of the box.
Because of this you need to explicitly add the GFM plugin in the addon-docs options:
https://storybook.js.org/docs/7.0/react/writing-docs/mdx#lack-of-github-flavored-markdown-gfm
https://storybook.js.org/docs/react/writing-docs/mdx#lack-of-github-flavored-markdown-gfm
We recommend you follow the guide on the link above, however we can add a temporary storybook addon that helps make this migration easier.
We'll install the addon and add it to your storybook config.
Expand Down
4 changes: 2 additions & 2 deletions code/renderers/html/template/cli/js/Button.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createButton } from './Button';

// More on how to set up stories at: https://storybook.js.org/docs/7.0/html/writing-stories/introduction
// More on how to set up stories at: https://storybook.js.org/docs/html/writing-stories/introduction
export default {
title: 'Example/Button',
tags: ['autodocs'],
Expand All @@ -21,7 +21,7 @@ export default {
},
};

// More on writing stories with args: https://storybook.js.org/docs/7.0/html/writing-stories/args
// More on writing stories with args: https://storybook.js.org/docs/html/writing-stories/args
export const Primary = {
args: {
primary: true,
Expand Down
6 changes: 3 additions & 3 deletions code/renderers/html/template/cli/js/Header.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { createHeader } from './Header';

export default {
title: 'Example/Header',
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/html/writing-docs/docs-page
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/html/writing-docs/autodocs
tags: ['autodocs'],
render: (args) => createHeader(args),
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/html/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/html/configure/story-layout
layout: 'fullscreen',
},
// More on argTypes: https://storybook.js.org/docs/7.0/html/api/argtypes
// More on argTypes: https://storybook.js.org/docs/html/api/argtypes
argTypes: {
onLogin: { action: 'onLogin' },
onLogout: { action: 'onLogout' },
Expand Down
4 changes: 2 additions & 2 deletions code/renderers/html/template/cli/js/Page.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ export default {
title: 'Example/Page',
render: () => createPage(),
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/html/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/html/configure/story-layout
layout: 'fullscreen',
},
};

export const LoggedOut = {};

// More on interaction testing: https://storybook.js.org/docs/7.0/html/writing-tests/interaction-testing
// More on interaction testing: https://storybook.js.org/docs/html/writing-tests/interaction-testing
export const LoggedIn = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/html/template/cli/ts-3-8/Button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const meta: Meta<ButtonProps> = {
export default meta;
type Story = StoryObj<ButtonProps>;

// More on writing stories with args: https://storybook.js.org/docs/7.0/html/writing-stories/args
// More on writing stories with args: https://storybook.js.org/docs/html/writing-stories/args
export const Primary: Story = {
args: {
primary: true,
Expand Down
6 changes: 3 additions & 3 deletions code/renderers/html/template/cli/ts-3-8/Header.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { createHeader } from './Header';

const meta: Meta<HeaderProps> = {
title: 'Example/Header',
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/html/writing-docs/docs-page
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/html/writing-docs/autodocs
tags: ['autodocs'],
render: (args) => createHeader(args),
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/html/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/html/configure/story-layout
layout: 'fullscreen',
},
// More on argTypes: https://storybook.js.org/docs/7.0/html/api/argtypes
// More on argTypes: https://storybook.js.org/docs/html/api/argtypes
argTypes: {
onLogin: { action: 'onLogin' },
onLogout: { action: 'onLogout' },
Expand Down
4 changes: 2 additions & 2 deletions code/renderers/html/template/cli/ts-3-8/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const meta: Meta = {
title: 'Example/Page',
render: () => createPage(),
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/html/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/html/configure/story-layout
layout: 'fullscreen',
},
};
Expand All @@ -15,7 +15,7 @@ export default meta;

export const LoggedOut: StoryObj = {};

// More on interaction testing: https://storybook.js.org/docs/7.0/html/writing-tests/interaction-testing
// More on interaction testing: https://storybook.js.org/docs/html/writing-tests/interaction-testing
export const LoggedIn: StoryObj = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/html/template/cli/ts-4-9/Button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const meta = {
export default meta;
type Story = StoryObj<ButtonProps>;

// More on writing stories with args: https://storybook.js.org/docs/7.0/html/writing-stories/args
// More on writing stories with args: https://storybook.js.org/docs/html/writing-stories/args
export const Primary: Story = {
args: {
primary: true,
Expand Down
6 changes: 3 additions & 3 deletions code/renderers/html/template/cli/ts-4-9/Header.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { createHeader } from './Header';

const meta = {
title: 'Example/Header',
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/html/writing-docs/docs-page
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/html/writing-docs/autodocs
tags: ['autodocs'],
render: (args) => createHeader(args),
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/html/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/html/configure/story-layout
layout: 'fullscreen',
},
// More on argTypes: https://storybook.js.org/docs/7.0/html/api/argtypes
// More on argTypes: https://storybook.js.org/docs/html/api/argtypes
argTypes: {
onLogin: { action: 'onLogin' },
onLogout: { action: 'onLogout' },
Expand Down
4 changes: 2 additions & 2 deletions code/renderers/html/template/cli/ts-4-9/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const meta = {
title: 'Example/Page',
render: () => createPage(),
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/7.0/html/configure/story-layout
// More on how to position stories at: https://storybook.js.org/docs/html/configure/story-layout
layout: 'fullscreen',
},
} satisfies Meta;
Expand All @@ -15,7 +15,7 @@ export default meta;

export const LoggedOut: StoryObj = {};

// More on interaction testing: https://storybook.js.org/docs/7.0/html/writing-tests/interaction-testing
// More on interaction testing: https://storybook.js.org/docs/html/writing-tests/interaction-testing
export const LoggedIn: StoryObj = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
4 changes: 2 additions & 2 deletions code/renderers/preact/template/cli/Button.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button } from './Button';

// More on how to set up stories at: https://storybook.js.org/docs/7.0/preact/writing-stories/introduction
// More on how to set up stories at: https://storybook.js.org/docs/preact/writing-stories/introduction
export default {
title: 'Example/Button',
component: Button,
Expand All @@ -11,7 +11,7 @@ export default {
},
};

// More on writing stories with args: https://storybook.js.org/docs/7.0/preact/writing-stories/args
// More on writing stories with args: https://storybook.js.org/docs/preact/writing-stories/args
export const Primary = {
args: {
primary: true,
Expand Down

0 comments on commit 1415453

Please sign in to comment.