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.
50 lines
1.3 KiB
50 lines
1.3 KiB
import { CommonModule } from '@angular/common';
|
|
import '@angular/localize/init';
|
|
import { MatButtonModule } from '@angular/material/button';
|
|
import { ActivatedRoute, RouterModule } from '@angular/router';
|
|
import { IonIcon } from '@ionic/angular/standalone';
|
|
import { moduleMetadata } from '@storybook/angular';
|
|
import type { Meta, StoryObj } from '@storybook/angular';
|
|
import { addYears } from 'date-fns';
|
|
|
|
import { GfLogoComponent } from '../logo';
|
|
import { GfMembershipCardComponent } from './membership-card.component';
|
|
|
|
export default {
|
|
title: 'Membership Card',
|
|
component: GfMembershipCardComponent,
|
|
decorators: [
|
|
moduleMetadata({
|
|
imports: [
|
|
CommonModule,
|
|
GfLogoComponent,
|
|
IonIcon,
|
|
MatButtonModule,
|
|
RouterModule.forChild([])
|
|
],
|
|
providers: [{ provide: ActivatedRoute, useValue: {} }]
|
|
})
|
|
],
|
|
argTypes: {
|
|
name: {
|
|
control: { type: 'select' },
|
|
options: ['Basic', 'Premium']
|
|
}
|
|
}
|
|
} as Meta<GfMembershipCardComponent>;
|
|
|
|
type Story = StoryObj<GfMembershipCardComponent>;
|
|
|
|
export const Basic: Story = {
|
|
args: {
|
|
name: 'Basic'
|
|
}
|
|
};
|
|
|
|
export const Premium: Story = {
|
|
args: {
|
|
expiresAt: addYears(new Date(), 1).toLocaleDateString(),
|
|
hasPermissionToCreateApiKey: true,
|
|
name: 'Premium'
|
|
}
|
|
};
|
|
|