Feature/add storybook story for logo component (#344)

* Add storybook story for logo component

* Update changelog
pull/345/head
Thomas Kaul 3 years ago committed by GitHub
parent 5fd413e57e
commit 21ed91d184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Extended the statistics section on the about page by the _GitHub_ contributors count
- Set up _Storybook_
- Added a story for the value component
- Added a story for the logo component
- Added a story for the value component
## 1.45.0 - 04.09.2021

@ -5,7 +5,7 @@ import { MatMenuModule } from '@angular/material/menu';
import { MatToolbarModule } from '@angular/material/toolbar';
import { RouterModule } from '@angular/router';
import { LoginWithAccessTokenDialogModule } from '@ghostfolio/client/components/login-with-access-token-dialog/login-with-access-token-dialog.module';
import { GfLogoModule } from '@ghostfolio/client/components/logo/logo.module';
import { GfLogoModule } from '@ghostfolio/ui/logo';
import { HeaderComponent } from './header.component';

@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { RouterModule } from '@angular/router';
import { GfLogoModule } from '@ghostfolio/client/components/logo/logo.module';
import { GfLogoModule } from '@ghostfolio/ui/logo';
import { NoTransactionsInfoComponent } from './no-transactions-info.component';

@ -3,7 +3,7 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { RouterModule } from '@angular/router';
import { GfLineChartModule } from '@ghostfolio/client/components/line-chart/line-chart.module';
import { GfLogoModule } from '@ghostfolio/client/components/logo/logo.module';
import { GfLogoModule } from '@ghostfolio/ui/logo';
import { LandingPageRoutingModule } from './landing-page-routing.module';
import { LandingPageComponent } from './landing-page.component';

@ -3,7 +3,7 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { RouterModule } from '@angular/router';
import { GfLogoModule } from '@ghostfolio/client/components/logo/logo.module';
import { GfLogoModule } from '@ghostfolio/ui/logo';
import { RegisterPageRoutingModule } from './register-page-routing.module';
import { RegisterPageComponent } from './register-page.component';

@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { GfLogoModule } from '@ghostfolio/client/components/logo/logo.module';
import { GfLogoModule } from '@ghostfolio/ui/logo';
import { WebauthnPageComponent } from '@ghostfolio/client/pages/webauthn/webauthn-page.component';
import { WebauthnPageRoutingModule } from './webauthn-page-routing.module';

@ -0,0 +1 @@
export * from './logo.module';

@ -0,0 +1,30 @@
import { Meta, Story, moduleMetadata } from '@storybook/angular';
import { LogoComponent } from './logo.component';
export default {
title: 'Logo',
component: LogoComponent,
decorators: [
moduleMetadata({
imports: []
})
]
} as Meta<LogoComponent>;
const Template: Story<LogoComponent> = (args: LogoComponent) => ({
props: args
});
export const Default = Template.bind({});
Default.args = {};
export const Large = Template.bind({});
Large.args = {
size: 'large'
};
export const NoName = Template.bind({});
NoName.args = {
hideName: true
};

@ -13,13 +13,12 @@ import {
styleUrls: ['./logo.component.scss']
})
export class LogoComponent implements OnInit {
@HostBinding('class') @Input() size: 'large' | 'medium';
@Input() hideName: boolean;
@HostBinding('class') @Input() size: 'large' | 'medium' = 'medium';
@Input() hideName = false;
public constructor() {}
public ngOnInit() {
this.hideName = this.hideName ?? false;
this.size = this.size ?? 'medium';
}
}
Loading…
Cancel
Save