Removes title and minor tweaks

This commit is contained in:
jonniebigodes 2023-05-25 21:04:33 +01:00
parent 1328d492f5
commit 16b100fe88
838 changed files with 106 additions and 3865 deletions

View File

@ -8,13 +8,13 @@ Component Story Format (CSF) is the recommended way to [write stories](../writin
<div class="aside">
💡 If you are writing stories in the older `storiesOf()` syntax, you can find documentation in an [advanced README](../../lib/preview-api/docs/storiesOf.md).
💡 If you are writing stories in the older `storiesOf()` syntax, you can find documentation in an [advanced README](https://github.com/storybookjs/storybook/blob/next/code/lib/preview-api/docs/storiesOf.md).
</div>
In CSF, stories and component metadata are defined as ES Modules. Every component story file consists of a required [default export](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export#Using_the_default_export) and one or more [named exports](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export).
CSF is supported in all frameworks except React Native, where you should use the [storiesOf API](../../lib/preview-api/docs/storiesOf.md) instead.
CSF is supported in all frameworks except React Native, where you should use the [storiesOf API](https://github.com/storybookjs/storybook/blob/next/code/lib/preview-api/docs/storiesOf.md) instead.
## Default export

View File

@ -6,7 +6,7 @@ Components often rely on images, videos, fonts, and other assets to render as th
### Import assets into stories
You can import any media assets by importing (or requiring) them. It works out of the box with our default config. But, if you are using a custom webpack config, youll need to add the [file loader](https://v4.webpack.js.org/loaders/) to handle the required files.
You can import any media assets by importing (or requiring) them. It works out of the box with our default config. But, if you are using a custom webpack config, youll need to add the [file loader](https://webpack.js.org/loaders/) to handle the required files.
Afterward, you can use any asset in your stories:
@ -149,4 +149,4 @@ Inside the `.storybook/` configuration folder, create `preview-head.html`, then
<CodeSnippets
paths={['common/storybook-preview-head-example.html.mdx']} />
<!-- prettier-ignore-end -->
<!-- prettier-ignore-end -->

View File

@ -4,7 +4,6 @@ To use auto-detected controls with Angular, you must fill in the `component` fie
import { Button } from './button.component';
export default {
title: 'Button',
component: Button,
};
```

View File

@ -24,7 +24,6 @@ Finally, to use auto-detected controls with Ember, you must fill in the `compone
```ts
export default {
title: 'Button',
component: 'button', // name of your button component from docgen-json file (index.js)
};
```

View File

@ -1,12 +1,11 @@
To use auto-detected controls with React, you must fill in the `component` field in your story metadata:
```ts
```js
// Button.stories.js|jsx|ts|tsx
import { Button } from './Button';
export default {
title: 'Button',
component: Button,
};
```

View File

@ -1,10 +1,9 @@
To use auto-detected controls with Vue, you must fill in the `component` field in your story metadata:
```ts
```js
import { Button } from './Button.vue';
export default {
title: 'Button',
component: Button,
};
```

View File

@ -1,9 +1,8 @@
To use auto-detected controls with Web components, you must fill in the `component` field in your story metadata:
```ts
```js
export default {
title: 'Button',
component: 'button', // name of your button component
component: 'button',
};
```

View File

@ -6,7 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { App } from './app.component';
const meta: Meta<App> = {
title: 'App',
component: App,
};

View File

@ -14,11 +14,6 @@ import { Button } from './button.component';
import * as ButtonStories from './Button.stories';
const meta: Meta<ButtonGroup> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'ButtonGroup',
component: ButtonGroup,
decorators: [
moduleMetadata({
@ -31,11 +26,6 @@ const meta: Meta<ButtonGroup> = {
export default meta;
type Story = StoryObj<ButtonGroup>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/angular/api/csf
* to learn how to use render functions.
*/
export const Pair: Story = {
args: {
buttons: [{ ...ButtonStories.Primary.args }, { ...ButtonStories.Secondary.args }],

View File

@ -8,11 +8,6 @@ import { withActions } from '@storybook/addon-actions/decorator';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
parameters: {
actions: {

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
argTypes: {
// Assigns the argTypes to the Colors category

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
argTypes: {
// Assigns the argTypes to the Colors category

View File

@ -6,7 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
title: 'Button',
component: Button,
//👇 Enables auto-generated documentation for the component story
tags: ['autodocs'],

View File

@ -8,11 +8,6 @@ import { action } from '@storybook/addon-actions';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -8,11 +8,6 @@ import { Button } from './button.component';
import { action } from '@storybook/addon-actions';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
//👇 Creates specific argTypes
argTypes: {

View File

@ -10,11 +10,6 @@ import { Button } from './button.component';
import { Parent } from './parent.component'; // Parent contains ng-content
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
decorators: [
moduleMetadata({

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
argTypes: {
variant: {

View File

@ -10,11 +10,6 @@ import { Button } from './button.component';
import { Parent } from './parent.component'; // Parent contains ng-content
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
parameters: { actions: { argTypesRegex: '^on.*' } },
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
argTypes: { onClick: { action: 'clicked' } },
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,22 +6,12 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};
export default meta;
type Story = StoryObj<Button>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/angular/api/csf
* to learn how to use render functions.
*/
export const Primary: Story = {
args: {
label: 'Button',

View File

@ -6,22 +6,12 @@ import type { Meta, StoryObj } from '@storybook/angular/';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};
export default meta;
type Story = StoryObj<Button>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/angular/api/csf
* to learn how to use render functions.
*/
export const Primary: Story = {
args: {
primary: true,

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
//👇 Creates specific parameters for the story
parameters: {

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
argTypes: {
// Button can be passed a label or an image, not both

View File

@ -6,16 +6,11 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
argTypes: {
label: { control: 'text' }, // always shows
label: { control: 'text' }, // Always shows the control
advanced: { control: 'boolean' },
// Below are only included when advanced is true
// Only enabled if advanced is true
margin: { control: 'number', if: { arg: 'advanced' } },
padding: { control: 'number', if: { arg: 'advanced' } },
cornerRadius: { control: 'number', if: { arg: 'advanced' } },

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { YourComponent } from './your-component.component';
const meta: Meta<YourComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'YourComponent',
component: YourComponent,
//👇 Creates specific argTypes with options
argTypes: {
@ -27,16 +22,10 @@ const meta: Meta<YourComponent> = {
export default meta;
type Story = StoryObj<YourComponent>;
//👇 Some function to demonstrate the behavior
const someFunction = (valuePropertyA: String, valuePropertyB: String) => {
// Makes some computations and returns something
// Do some logic here
};
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/angular/api/csf
* to learn how to use render functions.
*/
export const ExampleStory: Story = {
render: (args) => {
const { propertyA, propertyB } = args;

View File

@ -10,11 +10,6 @@ import { ArrowUp, ArrowDown, ArrowLeft, ArrowRight } from './icons';
const arrows = { ArrowUp, ArrowDown, ArrowLeft, ArrowRight };
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
argTypes: {
arrow: {

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { YourComponent } from './YourComponent.component';
const meta: Meta<YourComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'YourComponent',
component: YourComponent,
argTypes: {
// foo is the property we want to remove from the UI

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { YourComponent } from './YourComponent.component';
const meta: Meta<YourComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'YourComponent',
component: YourComponent,
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { YourComponent } from './YourComponent.component';
const meta: Meta<YourComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'YourComponent',
component: YourComponent,
argTypes: {
// foo is the property we want to remove from the UI

View File

@ -6,11 +6,6 @@ import type { Meta } from from '@storybook/angular';
import { YourComponent } from './YourComponent.component';
const meta: Meta<YourComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'YourComponent',
component: YourComponent,
parameters: { controls: { sort: 'requiredFirst' } },
};

View File

@ -6,22 +6,12 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'img',
component: MyComponent,
};
export default meta;
type Story = StoryObj<typeof meta>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/angular/api/csf
* to learn how to use render functions.
*/
export const WithAnImage: Story = {
render: () => ({
props: {

View File

@ -8,11 +8,6 @@ import { MyComponent } from './MyComponent.component';
import imageFile from './static/image.png';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'img',
component: MyComponent,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'img',
component: MyComponent,
};

View File

@ -6,10 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './Button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading to learn how to generate automatic titles
*/
title: 'Accessibility testing',
component: Button,
argTypes: {
backgroundColor: { control: 'color' },

View File

@ -12,11 +12,6 @@ import { Layout } from './Layout.component';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'MyComponent',
component: MyComponent,
decorators: [
moduleMetadata({

View File

@ -18,11 +18,6 @@ import { PageLayout } from './PageLayout.component';
import { MockGraphQLModule } from './mock-graphql.module';
const meta: Meta<DocumentScreen> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'DocumentScreen',
component: DocumentScreen,
decorators: [
moduleMetadata({
@ -56,30 +51,6 @@ const TestData = {
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
status: 'approved',
},
{
id: 2,
userID: 1,
title: 'Something else',
content:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
status: 'awaiting review',
},
{
id: 3,
userID: 2,
title: 'Another document',
content:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
status: 'approved',
},
{
id: 4,
userID: 2,
title: 'Something',
content:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
status: 'approved',
},
],
};

View File

@ -8,7 +8,6 @@ import { rest } from 'msw';
import { DocumentScreen } from './YourPage.component';
const meta: Meta<DocumentScreen> = {
title: 'DocumentScreen',
component: DocumentScreen,
};
@ -37,30 +36,6 @@ const TestData = {
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
status: 'approved',
},
{
id: 2,
userID: 1,
title: 'Something else',
content:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
status: 'awaiting review',
},
{
id: 3,
userID: 2,
title: 'Another document',
content:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
status: 'approved',
},
{
id: 4,
userID: 2,
title: 'Something',
content:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
status: 'approved',
},
],
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Gizmo } from './Gizmo.component';
const meta: Meta<Gizmo> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Gizmo',
component: Gizmo,
argTypes: {
canRotate: {

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { HistogramComponent } from './histogram.component';
const meta: Meta<HistogramComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Histogram',
component: HistogramComponent,
};

View File

@ -11,11 +11,6 @@ import { List } from './list.component';
import { ListItem } from './list-item.component';
const meta: Meta<List> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'List',
component: List,
decorators: [
moduleMetadata({

View File

@ -14,11 +14,6 @@ import { ListItem } from './list-item.component';
import { Selected, Unselected } from './ListItem.stories';
const meta: Meta<List> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'List',
component: List,
decorators: [
moduleMetadata({

View File

@ -10,10 +10,6 @@ import { CommonModule } from '@angular/common';
import { List } from './list.component';
const meta: Meta<List> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
component: List,
decorators: [
moduleMetadata({

View File

@ -12,11 +12,6 @@ import { CommonModule } from '@angular/common';
import { TodoItem } from './TodoItem';
const meta: Meta<TodoItem> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Examples/Loader',
component: TodoItem,
decorators: [
moduleMetadata({

View File

@ -10,11 +10,6 @@ import { expect } from '@storybook/jest';
import { LoginForm } from './LoginForm.component';
const meta: Meta<LoginForm> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Form',
component: LoginForm,
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { MyComponent } from './MyComponent';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'MyComponent',
component: MyComponent,
argTypes: {
label: {

View File

@ -7,11 +7,6 @@ import { MyComponent } from './MyComponent';
// To apply a set of backgrounds to all stories of Button:
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'MyComponent',
component: MyComponent,
};

View File

@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
title: 'QueryMethods',
component: MyComponent,
};

View File

@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
title: 'MyComponent',
component: MyComponent,
};

View File

@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
title: 'Async Query Methods',
component: MyComponent,
};

View File

@ -8,7 +8,6 @@ import { userEvent, waitFor, within } from '@storybook/testing-library';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
title: 'WithAsync',
component: MyComponent,
};

View File

@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
title: 'WithCanvasElement',
component: MyComponent,
};

View File

@ -8,7 +8,6 @@ import { fireEvent, userEvent, within } from '@storybook/testing-library';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
title: 'ClickExamples',
component: MyComponent,
};

View File

@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
title: 'WithDelay',
component: MyComponent,
};

View File

@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
title: 'WithSelectEvent',
component: MyComponent,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Path/To/MyComponent',
component: MyComponent,
};

View File

@ -8,11 +8,6 @@ import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'MyComponent',
component: MyComponent,
parameters: {
//👇 The viewports object from the Essentials addon

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'MyComponent',
component: MyComponent,
};

View File

@ -8,11 +8,6 @@ import { MyComponent } from './MyComponent.component';
import someData from './data.json';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'MyComponent',
component: MyComponent,
includeStories: ['SimpleStory', 'ComplexStory'], // 👈 Storybook loads these stories
excludeStories: /.*Data$/, // 👈 Storybook ignores anything that contains Data

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { MyComponent } from './MyComponent.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Path/To/MyComponent',
component: MyComponent,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'MyComponent',
component: MyComponent,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Page } from './page.component';
const meta: Meta<Page> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Page',
component: Page,
};

View File

@ -11,7 +11,6 @@ import * as DocumentHeader from './DocumentHeader.stories';
import * as DocumentList from './DocumentList.stories';
const meta: Meta<DocumentScreen> = {
title: 'DocumentScreen',
component: DocumentScreen,
};

View File

@ -15,11 +15,6 @@ import { Page } from './page.component';
import * as HeaderStories from './Header.stories';
const meta: Meta<Page> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Page',
component: Page,
decorators: [
moduleMetadata({

View File

@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
import { RegistrationForm } from './RegistrationForm.component';
const meta: Meta<RegistrationForm> = {
title: 'RegistrationForm',
component: RegistrationForm,
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { MyComponent } from './MyComponent';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Configure a11y addon',
component: MyComponent,
parameters: {
a11y: {

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Disable a11y addon',
component: MyComponent,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Configure a11y addon',
component: MyComponent,
};

View File

@ -7,11 +7,6 @@ import { Button } from './button.component';
// To apply a set of backgrounds to all stories of Button:
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
parameters: {
backgrounds: {

View File

@ -7,11 +7,6 @@ import { Button } from './button.component';
// To apply a set of backgrounds to all stories of Button:
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
parameters: {
backgrounds: {
@ -19,8 +14,8 @@ const meta: Meta<Button> = {
cellSize: 20,
opacity: 0.5,
cellAmount: 5,
offsetX: 16, // default is 0 if story has 'fullscreen' layout, 16 if layout is 'padded'
offsetY: 16, // default is 0 if story has 'fullscreen' layout, 16 if layout is 'padded'
offsetX: 16, // Default is 0 if story has 'fullscreen' layout, 16 if layout is 'padded'
offsetY: 16, // Default is 0 if story has 'fullscreen' layout, 16 if layout is 'padded'
},
},
},

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
// Sets the layout parameter component wide.
parameters: {

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
argTypes: {
label: {

View File

@ -10,11 +10,6 @@ import { expect } from '@storybook/jest';
import { Form } from './Form.component';
const meta: Meta<Form> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'MyComponent',
component: MyComponent,
argTypes: {
onSubmit: { action: true },

View File

@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
title: 'MyComponent',
component: MyComponent,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Table } from './Table.component';
const meta: Meta<Table> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Custom Table',
component: Table,
};

View File

@ -8,11 +8,6 @@ import type { Meta } from '@storybook/angular';
import { YourComponent } from './your.component';
const meta: Meta<YourComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'YourComponent',
component: YourComponent,
decorators: [componentWrapperDecorator((story) => `<div style="margin: 3em">${story}</div>`)],
};

View File

@ -7,11 +7,6 @@ import { YourComponent } from './your.component';
//👇 This default export determines where your story goes in the story list
const meta: Meta<YourComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'YourComponent',
component: YourComponent,
};

View File

@ -4,7 +4,6 @@
import App from './App';
export default {
title: 'App',
component: App,
};

View File

@ -7,7 +7,6 @@ import type { Meta, StoryObj } from '@storybook/your-framework';
import App from './App';
const meta = {
title: 'App',
component: App,
} satisfies Meta<typeof App>;

View File

@ -7,7 +7,6 @@ import type { Meta, StoryObj } from '@storybook/your-framework';
import App from './App';
const meta: Meta<typeof App> = {
title: 'App',
component: App,
};

View File

@ -6,11 +6,6 @@ import { Button } from './Button';
import { withActions } from '@storybook/addon-actions/decorator';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
parameters: {
actions: {

View File

@ -9,11 +9,6 @@ import { withActions } from '@storybook/addon-actions/decorator';
import { Button } from './Button';
const meta = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
parameters: {
actions: {

View File

@ -9,11 +9,6 @@ import { withActions } from '@storybook/addon-actions/decorator';
import { Button } from './Button';
const meta: Meta<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
*/
title: 'Button',
component: Button,
parameters: {
actions: {

View File

@ -4,11 +4,6 @@
import { Button } from './Button';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
argTypes: {
// Assigns the argTypes to the Colors category

View File

@ -7,11 +7,6 @@ import type { Meta } from '@storybook/your-framework';
import { Button } from './Button';
const meta = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
argTypes: {
// Assigns the argTypes to the Colors category

Some files were not shown because too many files have changed in this diff Show More