Skip to content

Commit

Permalink
Change Angular story files to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
Marklb committed Dec 8, 2023
1 parent 4a349de commit 1883a75
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion code/frameworks/angular/template/cli/button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
</button>`,
styleUrls: ['./button.css'],
})
export default class ButtonComponent {
export class ButtonComponent {
/**
* Is this the principal call to action on the page?
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { Meta, StoryObj } from '@storybook/angular';
import Button from './button.component';

import { ButtonComponent } from './button.component';

// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
const meta: Meta<Button> = {
const meta: Meta<ButtonComponent> = {
title: 'Example/Button',
component: Button,
component: ButtonComponent,
tags: ['autodocs'],
render: (args: Button) => ({
render: (args: ButtonComponent) => ({
props: {
backgroundColor: null,
...args,
Expand All @@ -20,7 +21,7 @@ const meta: Meta<Button> = {
};

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

// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
export const Primary: Story = {
Expand Down
8 changes: 4 additions & 4 deletions code/frameworks/angular/template/cli/header.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { CommonModule } from '@angular/common';

import Button from './button.component';
import type { User } from './User';
import { ButtonComponent } from './button.component';
import type { User } from './user';

@Component({
selector: 'storybook-header',
standalone: true,
imports: [CommonModule, Button],
imports: [CommonModule, ButtonComponent],
template: `<header>
<div class="storybook-header">
<div>
Expand Down Expand Up @@ -64,7 +64,7 @@ import type { User } from './User';
</header>`,
styleUrls: ['./header.css'],
})
export default class HeaderComponent {
export class HeaderComponent {
@Input()
user: User | null = null;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Meta, StoryObj } from '@storybook/angular';

import Header from './header.component';
import { HeaderComponent } from './header.component';

const meta: Meta<Header> = {
const meta: Meta<HeaderComponent> = {
title: 'Example/Header',
component: Header,
component: HeaderComponent,
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
tags: ['autodocs'],
parameters: {
Expand All @@ -14,7 +14,7 @@ const meta: Meta<Header> = {
};

export default meta;
type Story = StoryObj<Header>;
type Story = StoryObj<HeaderComponent>;

export const LoggedIn: Story = {
args: {
Expand Down
6 changes: 3 additions & 3 deletions code/frameworks/angular/template/cli/page.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

import HeaderComponent from './header.component';
import type { User } from './User';
import { HeaderComponent } from './header.component';
import type { User } from './user';

@Component({
selector: 'storybook-page',
Expand Down Expand Up @@ -65,7 +65,7 @@ import type { User } from './User';
</article>`,
styleUrls: ['./page.css'],
})
export default class PageComponent {
export class PageComponent {
user: User | null = null;

doLogout() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import type { Meta, StoryObj } from '@storybook/angular';
import { within, userEvent, expect } from '@storybook/test';

import Page from './page.component';
import { PageComponent } from './page.component';

const meta: Meta<Page> = {
const meta: Meta<PageComponent> = {
title: 'Example/Page',
component: Page,
component: PageComponent,
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
layout: 'fullscreen',
},
};

export default meta;
type Story = StoryObj<Page>;
type Story = StoryObj<PageComponent>;

export const LoggedOut: Story = {};

Expand Down

0 comments on commit 1883a75

Please sign in to comment.