mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 16:11:33 +08:00
Change Angular story files to lowercase
This commit is contained in:
parent
4a349dee5a
commit
1883a750c5
@ -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?
|
||||
*/
|
||||
|
@ -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,
|
||||
@ -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 = {
|
@ -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>
|
||||
@ -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;
|
||||
|
||||
|
@ -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: {
|
||||
@ -14,7 +14,7 @@ const meta: Meta<Header> = {
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<Header>;
|
||||
type Story = StoryObj<HeaderComponent>;
|
||||
|
||||
export const LoggedIn: Story = {
|
||||
args: {
|
@ -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',
|
||||
@ -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() {
|
||||
|
@ -1,11 +1,11 @@
|
||||
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',
|
||||
@ -13,7 +13,7 @@ const meta: Meta<Page> = {
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<Page>;
|
||||
type Story = StoryObj<PageComponent>;
|
||||
|
||||
export const LoggedOut: Story = {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user