mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-16 05:03:11 +08:00
Removes title and minor tweaks
This commit is contained in:
parent
1328d492f5
commit
16b100fe88
@ -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
|
||||
|
||||
|
@ -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, you’ll 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, you’ll 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 -->
|
||||
|
@ -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,
|
||||
};
|
||||
```
|
||||
|
@ -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)
|
||||
};
|
||||
```
|
||||
|
@ -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,
|
||||
};
|
||||
```
|
||||
|
@ -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,
|
||||
};
|
||||
```
|
||||
|
@ -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',
|
||||
};
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
|
||||
import { App } from './app.component';
|
||||
|
||||
const meta: Meta<App> = {
|
||||
title: 'App',
|
||||
component: App,
|
||||
};
|
||||
|
||||
|
@ -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 }],
|
||||
|
@ -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: {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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'],
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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: {
|
||||
|
@ -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({
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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.*' } },
|
||||
};
|
||||
|
@ -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' } },
|
||||
};
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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,
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
@ -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' } },
|
||||
|
@ -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;
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
@ -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' } },
|
||||
};
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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' },
|
||||
|
@ -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({
|
||||
|
@ -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',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -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',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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({
|
||||
|
@ -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({
|
||||
|
@ -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({
|
||||
|
@ -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({
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
|
||||
import { MyComponent } from './MyComponent.component';
|
||||
|
||||
const meta: Meta<MyComponent> = {
|
||||
title: 'QueryMethods',
|
||||
component: MyComponent,
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
|
||||
import { MyComponent } from './MyComponent.component';
|
||||
|
||||
const meta: Meta<MyComponent> = {
|
||||
title: 'MyComponent',
|
||||
component: MyComponent,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
|
||||
import { MyComponent } from './MyComponent.component';
|
||||
|
||||
const meta: Meta<MyComponent> = {
|
||||
title: 'WithCanvasElement',
|
||||
component: MyComponent,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
|
||||
import { MyComponent } from './MyComponent.component';
|
||||
|
||||
const meta: Meta<MyComponent> = {
|
||||
title: 'WithDelay',
|
||||
component: MyComponent,
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
|
||||
import { MyComponent } from './MyComponent.component';
|
||||
|
||||
const meta: Meta<MyComponent> = {
|
||||
title: 'WithSelectEvent',
|
||||
component: MyComponent,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -11,7 +11,6 @@ import * as DocumentHeader from './DocumentHeader.stories';
|
||||
import * as DocumentList from './DocumentList.stories';
|
||||
|
||||
const meta: Meta<DocumentScreen> = {
|
||||
title: 'DocumentScreen',
|
||||
component: DocumentScreen,
|
||||
};
|
||||
|
||||
|
@ -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({
|
||||
|
@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
|
||||
import { RegistrationForm } from './RegistrationForm.component';
|
||||
|
||||
const meta: Meta<RegistrationForm> = {
|
||||
title: 'RegistrationForm',
|
||||
component: RegistrationForm,
|
||||
};
|
||||
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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: {
|
||||
|
@ -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'
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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: {
|
||||
|
@ -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: {
|
||||
|
@ -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 },
|
||||
|
@ -8,7 +8,6 @@ import { userEvent, within } from '@storybook/testing-library';
|
||||
import { MyComponent } from './MyComponent.component';
|
||||
|
||||
const meta: Meta<MyComponent> = {
|
||||
title: 'MyComponent',
|
||||
component: MyComponent,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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>`)],
|
||||
};
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
import App from './App';
|
||||
|
||||
export default {
|
||||
title: 'App',
|
||||
component: App,
|
||||
};
|
||||
|
||||
|
@ -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>;
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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: {
|
||||
|
@ -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: {
|
||||
|
@ -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: {
|
||||
|
@ -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
|
||||
|
@ -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
Loading…
x
Reference in New Issue
Block a user