mirror of https://github.com/ghostfolio/ghostfolio
Thomas Kaul
3 years ago
committed by
GitHub
20 changed files with 147 additions and 81 deletions
@ -0,0 +1 @@ |
|||
export * from './premium-indicator.module'; |
@ -0,0 +1,6 @@ |
|||
<a |
|||
class="align-items-center d-flex" |
|||
[ngStyle]="{ 'pointer-events': enableLink ? 'initial' : 'none' }" |
|||
[routerLink]="['/pricing']" |
|||
><ion-icon class="text-muted" name="diamond-outline"></ion-icon |
|||
></a> |
@ -0,0 +1,3 @@ |
|||
:host { |
|||
display: block; |
|||
} |
@ -0,0 +1,29 @@ |
|||
import { CommonModule } from '@angular/common'; |
|||
import { RouterTestingModule } from '@angular/router/testing'; |
|||
import { Meta, Story, moduleMetadata } from '@storybook/angular'; |
|||
|
|||
import { PremiumIndicatorComponent } from './premium-indicator.component'; |
|||
|
|||
export default { |
|||
title: 'Premium Indicator', |
|||
component: PremiumIndicatorComponent, |
|||
decorators: [ |
|||
moduleMetadata({ |
|||
imports: [CommonModule, RouterTestingModule] |
|||
}) |
|||
] |
|||
} as Meta<PremiumIndicatorComponent>; |
|||
|
|||
const Template: Story<PremiumIndicatorComponent> = ( |
|||
args: PremiumIndicatorComponent |
|||
) => ({ |
|||
props: args |
|||
}); |
|||
|
|||
export const Default = Template.bind({}); |
|||
Default.args = {}; |
|||
|
|||
export const WithoutLink = Template.bind({}); |
|||
WithoutLink.args = { |
|||
enableLink: false |
|||
}; |
@ -0,0 +1,13 @@ |
|||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'gf-premium-indicator', |
|||
changeDetection: ChangeDetectionStrategy.OnPush, |
|||
templateUrl: './premium-indicator.component.html', |
|||
styleUrls: ['./premium-indicator.component.scss'] |
|||
}) |
|||
export class PremiumIndicatorComponent { |
|||
@Input() enableLink = true; |
|||
|
|||
public constructor() {} |
|||
} |
@ -0,0 +1,14 @@ |
|||
import { CommonModule } from '@angular/common'; |
|||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; |
|||
import { RouterModule } from '@angular/router'; |
|||
|
|||
import { PremiumIndicatorComponent } from './premium-indicator.component'; |
|||
|
|||
@NgModule({ |
|||
declarations: [PremiumIndicatorComponent], |
|||
exports: [PremiumIndicatorComponent], |
|||
imports: [CommonModule, RouterModule], |
|||
providers: [], |
|||
schemas: [CUSTOM_ELEMENTS_SCHEMA] |
|||
}) |
|||
export class GfPremiumIndicatorModule {} |
Loading…
Reference in new issue