Browse Source
Feature/add storybook story for logo component (#344)
* Add storybook story for logo component
* Update changelog
pull/345/head
Thomas Kaul
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with
40 additions and
9 deletions
-
CHANGELOG.md
-
apps/client/src/app/components/header/header.module.ts
-
apps/client/src/app/components/no-transactions-info/no-transactions-info.module.ts
-
apps/client/src/app/pages/landing/landing-page.module.ts
-
apps/client/src/app/pages/register/register-page.module.ts
-
apps/client/src/app/pages/webauthn/webauthn-page.module.ts
-
libs/ui/src/lib/logo/index.ts
-
libs/ui/src/lib/logo/logo.component.html
-
libs/ui/src/lib/logo/logo.component.scss
-
libs/ui/src/lib/logo/logo.component.stories.ts
-
libs/ui/src/lib/logo/logo.component.ts
-
libs/ui/src/lib/logo/logo.module.ts
|
@ -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 |
|
|
- Extended the statistics section on the about page by the _GitHub_ contributors count |
|
|
- Set up _Storybook_ |
|
|
- 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 |
|
|
## 1.45.0 - 04.09.2021 |
|
|
|
|
|
|
|
|
|
@ -5,7 +5,7 @@ import { MatMenuModule } from '@angular/material/menu'; |
|
|
import { MatToolbarModule } from '@angular/material/toolbar'; |
|
|
import { MatToolbarModule } from '@angular/material/toolbar'; |
|
|
import { RouterModule } from '@angular/router'; |
|
|
import { RouterModule } from '@angular/router'; |
|
|
import { LoginWithAccessTokenDialogModule } from '@ghostfolio/client/components/login-with-access-token-dialog/login-with-access-token-dialog.module'; |
|
|
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'; |
|
|
import { HeaderComponent } from './header.component'; |
|
|
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common'; |
|
|
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; |
|
|
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; |
|
|
import { MatButtonModule } from '@angular/material/button'; |
|
|
import { MatButtonModule } from '@angular/material/button'; |
|
|
import { RouterModule } from '@angular/router'; |
|
|
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'; |
|
|
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 { MatButtonModule } from '@angular/material/button'; |
|
|
import { RouterModule } from '@angular/router'; |
|
|
import { RouterModule } from '@angular/router'; |
|
|
import { GfLineChartModule } from '@ghostfolio/client/components/line-chart/line-chart.module'; |
|
|
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 { LandingPageRoutingModule } from './landing-page-routing.module'; |
|
|
import { LandingPageComponent } from './landing-page.component'; |
|
|
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 { MatButtonModule } from '@angular/material/button'; |
|
|
import { MatCardModule } from '@angular/material/card'; |
|
|
import { MatCardModule } from '@angular/material/card'; |
|
|
import { RouterModule } from '@angular/router'; |
|
|
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 { RegisterPageRoutingModule } from './register-page-routing.module'; |
|
|
import { RegisterPageComponent } from './register-page.component'; |
|
|
import { RegisterPageComponent } from './register-page.component'; |
|
|
|
@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common'; |
|
|
import { NgModule } from '@angular/core'; |
|
|
import { NgModule } from '@angular/core'; |
|
|
import { MatButtonModule } from '@angular/material/button'; |
|
|
import { MatButtonModule } from '@angular/material/button'; |
|
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; |
|
|
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 { WebauthnPageComponent } from '@ghostfolio/client/pages/webauthn/webauthn-page.component'; |
|
|
|
|
|
|
|
|
import { WebauthnPageRoutingModule } from './webauthn-page-routing.module'; |
|
|
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'] |
|
|
styleUrls: ['./logo.component.scss'] |
|
|
}) |
|
|
}) |
|
|
export class LogoComponent implements OnInit { |
|
|
export class LogoComponent implements OnInit { |
|
|
@HostBinding('class') @Input() size: 'large' | 'medium'; |
|
|
@HostBinding('class') @Input() size: 'large' | 'medium' = 'medium'; |
|
|
@Input() hideName: boolean; |
|
|
@Input() hideName = false; |
|
|
|
|
|
|
|
|
public constructor() {} |
|
|
public constructor() {} |
|
|
|
|
|
|
|
|
public ngOnInit() { |
|
|
public ngOnInit() { |
|
|
this.hideName = this.hideName ?? false; |
|
|
this.hideName = this.hideName ?? false; |
|
|
this.size = this.size ?? 'medium'; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |