mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.2 KiB
44 lines
1.2 KiB
import { CommonModule } from '@angular/common';
|
|
import { importProvidersFrom } from '@angular/core';
|
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
|
import { applicationConfig, Meta, StoryObj } from '@storybook/angular';
|
|
|
|
import { EntityLogoImageSourceServiceMock } from '../mocks/entity-logo-image-source.service.mock';
|
|
import { EntityLogoImageSourceService } from './entity-logo-image-source.service';
|
|
import { GfEntityLogoComponent } from './entity-logo.component';
|
|
|
|
export default {
|
|
title: 'Entity Logo',
|
|
component: GfEntityLogoComponent,
|
|
decorators: [
|
|
applicationConfig({
|
|
providers: [
|
|
importProvidersFrom(NoopAnimationsModule),
|
|
importProvidersFrom(CommonModule),
|
|
{
|
|
provide: EntityLogoImageSourceService,
|
|
useValue: new EntityLogoImageSourceServiceMock()
|
|
}
|
|
]
|
|
})
|
|
]
|
|
} as Meta<GfEntityLogoComponent>;
|
|
|
|
type Story = StoryObj<GfEntityLogoComponent>;
|
|
|
|
export const LogoByAssetProfileIdentifier: Story = {
|
|
args: {
|
|
dataSource: 'YAHOO',
|
|
size: 'large',
|
|
symbol: 'AAPL',
|
|
tooltip: 'Apple Inc.'
|
|
}
|
|
};
|
|
|
|
export const LogoByUrl: Story = {
|
|
args: {
|
|
size: 'large',
|
|
tooltip: 'Ghostfolio',
|
|
url: 'https://ghostfol.io'
|
|
}
|
|
};
|
|
|