Change Angular story files to lowercase

This commit is contained in:
Mark berry 2023-12-08 11:40:35 -06:00
parent 4a349dee5a
commit 1883a750c5
7 changed files with 22 additions and 21 deletions

View File

@ -15,7 +15,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
</button>`, </button>`,
styleUrls: ['./button.css'], styleUrls: ['./button.css'],
}) })
export default class ButtonComponent { export class ButtonComponent {
/** /**
* Is this the principal call to action on the page? * Is this the principal call to action on the page?
*/ */

View File

@ -1,12 +1,13 @@
import type { Meta, StoryObj } from '@storybook/angular'; 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 // 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', title: 'Example/Button',
component: Button, component: ButtonComponent,
tags: ['autodocs'], tags: ['autodocs'],
render: (args: Button) => ({ render: (args: ButtonComponent) => ({
props: { props: {
backgroundColor: null, backgroundColor: null,
...args, ...args,
@ -20,7 +21,7 @@ const meta: Meta<Button> = {
}; };
export default meta; 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 // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
export const Primary: Story = { export const Primary: Story = {

View File

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

View File

@ -1,10 +1,10 @@
import type { Meta, StoryObj } from '@storybook/angular'; 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', title: 'Example/Header',
component: Header, component: HeaderComponent,
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
tags: ['autodocs'], tags: ['autodocs'],
parameters: { parameters: {
@ -14,7 +14,7 @@ const meta: Meta<Header> = {
}; };
export default meta; export default meta;
type Story = StoryObj<Header>; type Story = StoryObj<HeaderComponent>;
export const LoggedIn: Story = { export const LoggedIn: Story = {
args: { args: {

View File

@ -1,8 +1,8 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import HeaderComponent from './header.component'; import { HeaderComponent } from './header.component';
import type { User } from './User'; import type { User } from './user';
@Component({ @Component({
selector: 'storybook-page', selector: 'storybook-page',
@ -65,7 +65,7 @@ import type { User } from './User';
</article>`, </article>`,
styleUrls: ['./page.css'], styleUrls: ['./page.css'],
}) })
export default class PageComponent { export class PageComponent {
user: User | null = null; user: User | null = null;
doLogout() { doLogout() {

View File

@ -1,11 +1,11 @@
import type { Meta, StoryObj } from '@storybook/angular'; import type { Meta, StoryObj } from '@storybook/angular';
import { within, userEvent, expect } from '@storybook/test'; 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', title: 'Example/Page',
component: Page, component: PageComponent,
parameters: { parameters: {
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
layout: 'fullscreen', layout: 'fullscreen',
@ -13,7 +13,7 @@ const meta: Meta<Page> = {
}; };
export default meta; export default meta;
type Story = StoryObj<Page>; type Story = StoryObj<PageComponent>;
export const LoggedOut: Story = {}; export const LoggedOut: Story = {};