Browse Source

feat(storybook): create story for tags selector

pull/4289/head
KenTandrian 7 months ago
parent
commit
f3fcc335e0
  1. 57
      libs/ui/src/lib/tags-selector/tags-selector.component.stories.ts

57
libs/ui/src/lib/tags-selector/tags-selector.component.stories.ts

@ -0,0 +1,57 @@
import { CommonModule } from '@angular/common';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { Meta, moduleMetadata, StoryObj } from '@storybook/angular';
import { GfTagsSelectorComponent } from './tags-selector.component';
export default {
title: 'Tags Selector',
component: GfTagsSelectorComponent,
decorators: [
moduleMetadata({
imports: [CommonModule, NoopAnimationsModule]
})
]
} as Meta<GfTagsSelectorComponent>;
type Story = StoryObj<GfTagsSelectorComponent>;
const OPTIONS = [
{
id: 'EMERGENCY_FUND',
name: 'Emergency Fund',
userId: '1'
},
{
id: 'RETIREMENT_FUND',
name: 'Retirement Fund',
userId: '2'
}
];
export const Default: Story = {
args: {
tags: [
{
id: 'EMERGENCY_FUND',
name: 'Emergency Fund',
userId: '1'
}
],
tagsAvailable: OPTIONS
}
};
export const NoSelected: Story = {
args: {
tags: [],
tagsAvailable: OPTIONS
}
};
export const NoOptions: Story = {
args: {
tags: [],
tagsAvailable: []
}
};
Loading…
Cancel
Save