Skip to content

Commit

Permalink
Replace 'storyName' with 'name' in Angular stories
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Oct 11, 2023
1 parent 79c2381 commit 7bec7b3
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default meta;
type Story = StoryObj<CustomCvaComponent>;

export const SimpleInput: Story = {
storyName: 'Simple input',
name: 'Simple input',
render: () => ({
props: {
ngModel: 'Type anything',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Input } from '@angular/core';
import { componentWrapperDecorator, Meta, StoryFn, StoryObj } from '@storybook/angular';
import { componentWrapperDecorator, Meta, StoryObj } from '@storybook/angular';

@Component({
selector: 'sb-button',
Expand Down Expand Up @@ -54,5 +54,5 @@ export const InH1: Story = {
template: 'My button in h1',
}),
decorators: [componentWrapperDecorator((story) => `<h1>${story}</h1>`)],
storyName: 'In <h1>',
name: 'In <h1>',
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export default meta;
type Story = StoryObj<OnPushBoxComponent>;

export const ClassSpecifiedComponentWithOnPushAndArgs: Story = {
storyName: 'Class-specified component with OnPush and Args',
name: 'Class-specified component with OnPush and Args',
};
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const Simple: Story = {
};

export const WithArgsStory: Story = {
storyName: 'With args',
name: 'With args',
argTypes: {
field: { control: 'text' },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export const InputsAndInjectDependencies: Story = {
title: 'Component dependencies',
},
}),
storyName: 'inputs and inject dependencies',
name: 'inputs and inject dependencies',
};

export const InputsAndInjectDependenciesWithArgs: Story = {
storyName: 'inputs and inject dependencies with args',
name: 'inputs and inject dependencies with args',
argTypes: {
title: { control: 'text' },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export default meta;
type Story = StoryObj<StyledComponent>;

export const ComponentWithStyles: Story = {
storyName: 'Component with styles',
name: 'Component with styles',
};
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class NgComponentOutletWrapperComponent implements OnInit {
// Live changing of args by controls does not work at the moment. When changing args storybook does not fully
// reload and therefore does not take into account the change of provider.
export const WithCustomNgComponentOutletWrapper: Story = {
storyName: 'Custom wrapper *NgComponentOutlet',
name: 'Custom wrapper *NgComponentOutlet',
argTypes: {
name: { control: 'text' },
color: { control: 'color' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export default meta;

type Story = StoryObj<ChipsGroupComponent>;

export const Base = {
storyName: 'Chips group',
export const Base: Story = {
name: 'Chips group',
};

export const WithCustomProvider = {
export const WithCustomProvider: Story = {
decorators: [
moduleMetadata({
providers: [
Expand All @@ -48,5 +48,5 @@ export const WithCustomProvider = {
],
}),
],
storyName: 'Chips group with overridden provider',
name: 'Chips group with overridden provider',
};

0 comments on commit 7bec7b3

Please sign in to comment.