Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/snippets/web-components/addon-highlight-reset.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import type { Meta, StoryObj } from '@storybook/web-components';
import { useChannel } from '@storybook/preview-api';
import { HIGHLIGHT, RESET_HIGHLIGHT } from '@storybook/addon-highlight';

export default {
const meta: Meta = {
component: 'my-component',
};

export default meta;
type Story = StoryObj;

export const ResetHighlight: Story = {
decorators: [
(story) => {
Expand Down
3 changes: 1 addition & 2 deletions docs/snippets/web-components/arg-types-in-story.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ const meta: Meta = {
};

export default meta;

type Story = StoryObj<typeof Button>;
type Story = StoryObj;

export const Basic: Story = {
argTypes: {
Expand Down
1 change: 1 addition & 0 deletions docs/snippets/web-components/arg-types-mapping.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const meta: Meta = {
},
},
};

export default meta;
```
2 changes: 1 addition & 1 deletion docs/snippets/web-components/button-group-story.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import * as ButtonStories from './Button.stories';
const meta: Meta = {
component: 'demo-button-group',
};
export default meta;

export default meta;
type Story = StoryObj;

export const Pair: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Button.stories.ts

import type { Meta } from '@storybook/web-components';

import { withActions } from '@storybook/addon-actions/decorator';

const meta: Meta = {
Expand Down
2 changes: 0 additions & 2 deletions docs/snippets/web-components/button-story-baseline.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

import type { Meta, StoryObj } from '@storybook/web-components';

import { Button } from './Button';

const meta: Meta = {
component: 'demo-button',
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
```ts
// Button.stories.ts

import { html } from 'lit';

import type { Meta, StoryObj } from '@storybook/web-components';

import { action } from '@storybook/addon-actions';

import { html } from 'lit';

const meta: Meta = {
component: 'custom-button',
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
```ts
// Button.stories.ts

import { html } from 'lit';

import type { Meta, StoryObj } from '@storybook/web-components';

import { action } from '@storybook/addon-actions';

import { html } from 'lit';

const meta: Meta = {
component: 'custom-button',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ const meta: Meta = {
primary: true,
},
};

export default meta;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const meta: Meta = {
component: 'demo-button',
decorators: [(story) => html`<div style="margin: 3em">${story()}</div>`],
};
export default meta;

export default meta;
type Story = StoryObj;

export const Example: Story = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'demo-button',
};
export default meta;

export default meta;
type Story = StoryObj;

export const Primary: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ const meta: Meta = {
title: 'Button',
component: 'demo-button',
};

export default meta;
```
1 change: 1 addition & 0 deletions docs/snippets/web-components/button-story-grouped.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ const meta: Meta = {
title: 'Design System/Atoms/Button',
component: 'demo-button',
};

export default meta;
```
2 changes: 1 addition & 1 deletion docs/snippets/web-components/button-story-hoisted.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const meta: Meta = {
title: 'Design System/Atoms/Button',
component: 'demo-component',
};
export default meta;

export default meta;
type Story = StoryObj;

// This is the only named export in the file, and it matches the component name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'demo-button',
};
export default meta;

export default meta;
type Story = StoryObj;

export const Primary: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'demo-button',
};
export default meta;

export default meta;
type Story = StoryObj;

export const Primary: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'demo-button',
};
export default meta;

export default meta;
type Story = StoryObj;

export const Primary: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@

import type { Meta, StoryObj } from '@storybook/web-components';

import { Button } from './Button';

const meta: Meta = {
component: 'demo-button',
};
export default meta;

export default meta;
type Story = StoryObj;

export const Primary: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'demo-button',
};
export default meta;

export default meta;
type Story = StoryObj;

export const Primary: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const meta: Meta = {
},
},
};

export default meta;
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { html } from 'lit';
const meta: Meta = {
component: 'demo-button',
};
export default meta;

export default meta;
type Story = StoryObj;

/*
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/web-components/button-story.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { html } from 'lit';
const meta: Meta = {
component: 'demo-button',
};
export default meta;

export default meta;
type Story = StoryObj;

export const Primary: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ const meta: Meta = {
title: 'Design System/Atoms/Checkbox',
component: 'demo-checkbox',
};

export default meta;
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'demo-button',
};
export default meta;

export default meta;
type Story = StoryObj<typeof Button>;

export const Primary: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import type { Meta, StoryObj } from '@storybook/web-components';
import { useChannel } from '@storybook/preview-api';
import { HIGHLIGHT } from '@storybook/addon-highlight';

export default {
const meta: Meta = {
component: 'my-component',
};

export default meta;
type Story = StoryObj;

export const Highlighted: Story = {
decorators: [
(story) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
```ts
// MyComponent.stories.ts

import { html } from 'lit';

import type { Meta, StoryObj } from '@storybook/web-components';

import { html } from 'lit';

const meta: Meta = {
component: 'my-component',
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
```ts
// MyComponent.stories.ts

import { html } from 'lit';

import type { Meta, StoryObj } from '@storybook/web-components';

import { html } from 'lit';

import imageFile from './static/image.png';

const meta: Meta = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
```ts
// MyComponent.stories.ts

import { html } from 'lit';

import type { Meta, StoryObj } from '@storybook/web-components';

import { html } from 'lit';

const meta: Meta = {
component: 'my-component',
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
```ts
// MyComponent.stories.ts

import { html } from 'lit';

import type { Meta, StoryObj } from '@storybook/web-components';

import { html } from 'lit';

const meta: Meta = {
component: 'my-component',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const meta: Meta = {
title: 'components/Button',
component: 'demo-button',
};
export default meta;

export default meta;
type Story = StoryObj;

export const Primary: Story = { args: { primary: true } };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import type { Meta, StoryObj } from '@storybook/web-components';
import { useChannel } from '@storybook/preview-api';
import { HIGHLIGHT } from '@storybook/addon-highlight';

export default {
const meta: Meta = {
component: 'my-component',
};

export default meta;
type Story = StoryObj;

export const StyledHighlight: Story = {
decorators: [
(story) => {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/web-components/list-story-expanded.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { html } from 'lit';
const meta: Meta = {
component: 'demo-list',
};
export default meta;

export default meta;
type Story = StoryObj;

export const Empty: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { Selected, Unselected } from './ListItem.stories';
const meta: Meta = {
component: 'demo-list',
};
export default meta;

export default meta;
type Story = StoryObj;

export const ManyItems: Story = {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/web-components/list-story-starter.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'demo-list',
};
export default meta;

export default meta;
type Story = StoryObj;

// Always an empty list, not super interesting
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/web-components/list-story-template.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const meta: Meta = {
title: 'List',
component: 'demo-list',
};
export default meta;

export default meta;
type Story = StoryObj;

//👇 The ListTemplate construct will be spread to the existing stories.
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/web-components/loader-story.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const meta: Meta = {
component: 'demo-todo-item',
render: (args, { loaded: { todo } }) => TodoItem({ ...args, ...todo }),
};
export default meta;

export default meta;
type Story = StoryObj;

export const Primary: Story = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { expect } from '@storybook/jest';
const meta: Meta = {
component: 'demo-login-form',
};
export default meta;

export default meta;
type Story = StoryObj;

export const EmptyForm: Story = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ const meta: Meta = {
},
},
};

export default meta;
```
Loading