Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion code/frameworks/angular/template/cli/Header.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const meta: Meta<Header> = {
component: Header,
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/angular/writing-docs/autodocs
tags: ['autodocs'],
render: (args) => ({ props: args }),
decorators: [
moduleMetadata({
declarations: [Button],
Expand Down
5 changes: 3 additions & 2 deletions code/frameworks/angular/template/cli/User.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface User {}
export interface User {
name: string;
}
1 change: 1 addition & 0 deletions code/frameworks/angular/template/cli/button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';

@Component({
selector: 'storybook-button',
standalone: true,
imports: [CommonModule],
template: ` <button
type="button"
Expand Down
7 changes: 5 additions & 2 deletions code/frameworks/angular/template/cli/header.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { CommonModule } from '@angular/common';
import type { User } from './User';
import ButtonComponent from './button.component';

@Component({
selector: 'storybook-header',
imports: [CommonModule, ButtonComponent],
standalone: true,
template: `<header>
<div class="storybook-header">
<div>
Expand Down Expand Up @@ -47,9 +51,8 @@ import type { User } from './User';
></storybook-button>
<storybook-button
*ngIf="!user"
primary
size="small"
primary="true"
[primary]="true"
class="margin-left"
(onClick)="onCreateAccount.emit($event)"
label="Sign up"
Expand Down
3 changes: 3 additions & 0 deletions code/frameworks/angular/template/cli/page.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Component } from '@angular/core';
import type { User } from './User';
import HeaderComponent from './header.component';

@Component({
selector: 'storybook-page',
imports: [HeaderComponent],
standalone: true,
template: `<article>
<storybook-header
[user]="user"
Expand Down