Skip to content

Commit

Permalink
refactor: renamed Meta into StoryMeta (type Meta existed before)
Browse files Browse the repository at this point in the history
  • Loading branch information
natterstefan committed Feb 10, 2022
1 parent 42ca674 commit 8c1ad7b
Show file tree
Hide file tree
Showing 58 changed files with 116 additions and 116 deletions.
4 changes: 2 additions & 2 deletions addons/interactions/src/Panel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const StyledWrapper = styled.div(({ theme }) => ({
overflow: 'auto',
}));

const Meta: ComponentMeta<typeof AddonPanelPure> = {
const StoryMeta: ComponentMeta<typeof AddonPanelPure> = {
title: 'Addons/Interactions/Panel',
component: AddonPanelPure,
decorators: [
Expand Down Expand Up @@ -48,7 +48,7 @@ const Meta: ComponentMeta<typeof AddonPanelPure> = {
},
};

export default Meta;
export default StoryMeta;

type Story = ComponentStoryObj<typeof AddonPanelPure>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import SubnavStories from '../Subnav/Subnav.stories';

type Story = ComponentStoryObj<typeof Interaction>;

const Meta: ComponentMeta<typeof Interaction> = {
const StoryMeta: ComponentMeta<typeof Interaction> = {
title: 'Addons/Interactions/Interaction',
component: Interaction,
args: {
Expand All @@ -19,7 +19,7 @@ const Meta: ComponentMeta<typeof Interaction> = {
},
};

export default Meta;
export default StoryMeta;

export const Active: Story = {
args: {
Expand Down
4 changes: 2 additions & 2 deletions app/react/src/client/preview/types-6-3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export * from './types-6-0';
* For the common case where a component's stories are simple components that receives args as props:
*
* ```tsx
* const Meta: ComponentMeta<typeof Button> = { ... };
* export default Meta;
* const StoryMeta: ComponentMeta<typeof Button> = { ... };
* export default StoryMeta;
* ```
*/
export type ComponentMeta<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> =
Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/react/app-story-with-mock.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';

import App from './App';

const Meta: ComponentMeta<typeof App> = {
const StoryMeta: ComponentMeta<typeof App> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -16,7 +16,7 @@ const Meta: ComponentMeta<typeof App> = {
component: App,
};

export default Meta;
export default StoryMeta;

const Template: ComponentStory<typeof App> = () => <App />;

Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/react/button-group-story.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ButtonGroup } from '../ButtonGroup';
//👇 Imports the Button stories
import * as ButtonStories from './Button.stories';

const Meta: ComponentMeta<typeof ButtonGroup> = {
const StoryMeta: ComponentMeta<typeof ButtonGroup> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -19,7 +19,7 @@ const Meta: ComponentMeta<typeof ButtonGroup> = {
component: ButtonGroup,
};

export default Meta;
export default StoryMeta;

const Template: ComponentStory<typeof ButtonGroup> = (args) => <ButtonGroup {...args} />;

Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-click-handler.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { action } from '@storybook/addon-actions';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -18,7 +18,7 @@ const Meta: ComponentMeta<typeof Button> = {
component: Button,
};

export default Meta;
export default StoryMeta;

export const Basic: ComponentStory<typeof Button> = () => <Button label="Hello" onClick={action('clicked')} />;
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentMeta } from '@storybook/react';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -24,5 +24,5 @@ const Meta: ComponentMeta<typeof Button> = {
},
};

export default Meta;
export default StoryMeta;
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentMeta } from '@storybook/react';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -23,5 +23,5 @@ const Meta: ComponentMeta<typeof Button> = {
],
};

export default Meta;
export default StoryMeta;
```
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-component-decorator.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentMeta } from '@storybook/react';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -23,5 +23,5 @@ const Meta: ComponentMeta<typeof Button> = {
],
};

export default Meta;
export default StoryMeta;
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react';

import { ComponentStory, ComponentMeta } from '@storybook/react';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -14,7 +14,7 @@ const Meta: ComponentMeta<typeof Button> = {
component: Button,
};

export default Meta;
export default StoryMeta;

const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;

Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-decorator.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react';

import { ComponentStory, ComponentMeta } from '@storybook/react';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -14,7 +14,7 @@ const Meta: ComponentMeta<typeof Button> = {
component: Button,
};

export default Meta;
export default StoryMeta;

const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;

Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-default-docs-code.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const someFunction = (someValue: String) => {
return `i am a ${someValue}`;
};

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -25,7 +25,7 @@ const Meta: ComponentMeta<typeof Button> = {
},
};

export default Meta;
export default StoryMeta;

export const ExampleStory: ComponentStory<typeof Button> = (args) => {
//👇 Destructure the label from the args object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentMeta } from '@storybook/react';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -16,5 +16,5 @@ const Meta: ComponentMeta<typeof Button> = {
component: Button,
};

export default Meta;
export default StoryMeta;
```
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-rename-story.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -16,7 +16,7 @@ const Meta: ComponentMeta<typeof Button> = {
component: Button,
};

export default Meta;
export default StoryMeta;

export const Primary: ComponentStory<typeof Button> = () => <Button primary label="Button"/>;
Primary.storyName = 'I am the primary';
Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-using-args.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -16,7 +16,7 @@ const Meta: ComponentMeta<typeof Button> = {
component: Button,
};

export default Meta;
export default StoryMeta;

//👇 We create a “template” of how args map to rendering
const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;
Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-with-addon-example.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -22,7 +22,7 @@ const Meta: ComponentMeta<typeof Button> = {
},
};

export default Meta;
export default StoryMeta;

const Basic: ComponentStory<typeof Button> = () => <Button>hello</Button>;
```
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-with-args.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';

import { Button, ButtonProps } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -16,7 +16,7 @@ const Meta: ComponentMeta<typeof Button> = {
component: Button,
};

export default Meta;
export default StoryMeta;

//👇 We create a “template” of how args map to rendering
const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;
Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-with-blue-args.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentMeta } from '@storybook/react';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -26,5 +26,5 @@ const Meta: ComponentMeta<typeof Button> = {
},
};

export default Meta;
export default StoryMeta;
```
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-with-emojis.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -16,7 +16,7 @@ const Meta: ComponentMeta<typeof Button> = {
component: Button,
};

export default Meta;
export default StoryMeta;

export const Primary: ComponentStory<typeof Button> = () => (
<Button backgroundColor="#ff0" label="Button" />
Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-with-parameters.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Button } from './Button';

import { ComponentMeta } from '@storybook/react';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -25,5 +25,5 @@ const Meta: ComponentMeta<typeof Button> = {
},
};

export default Meta;
export default StoryMeta;
```
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';

import { Button } from './Button';

const Meta: ComponentMeta<typeof Button> = {
const StoryMeta: ComponentMeta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -16,7 +16,7 @@ const Meta: ComponentMeta<typeof Button> = {
component: Button,
};

export default Meta;
export default StoryMeta;

export const Primary: ComponentStory<typeof Button> = () => <Button primary>Button</Button>;
```
4 changes: 2 additions & 2 deletions docs/snippets/react/checkbox-story-csf.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ComponentMeta, ComponentStory } from '@storybook/react';

import { Checkbox } from './Checkbox';

const Meta: ComponentMeta<typeof Checkbox> = {
const StoryMeta: ComponentMeta<typeof Checkbox> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
Expand All @@ -16,7 +16,7 @@ const Meta: ComponentMeta<typeof Checkbox> = {
component: Checkbox,
};

export default Meta;
export default StoryMeta;

export const allCheckboxes: ComponentStory<typeof Checkbox> = () => (
<form>
Expand Down
Loading

0 comments on commit 8c1ad7b

Please sign in to comment.