Browse Source

refactor: migrate remaining Storybook stories to provideAnimationsAsync

Migrate NoopAnimationsModule to provideAnimationsAsync('noop') in:
- fire-calculator.component.stories.ts
- tags-selector.component.stories.ts

Moves from NgModule imports to standalone providers style,
matching the pattern used in the other story files.
pull/6716/head
Trevin Chow 2 weeks ago
parent
commit
77788a8b83
  1. 9
      libs/ui/src/lib/fire-calculator/fire-calculator.component.stories.ts
  2. 5
      libs/ui/src/lib/tags-selector/tags-selector.component.stories.ts

9
libs/ui/src/lib/fire-calculator/fire-calculator.component.stories.ts

@ -8,7 +8,7 @@ import { provideNativeDateAdapter } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatFormFieldModule } from '@angular/material/form-field'; import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input'; import { MatInputModule } from '@angular/material/input';
import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { moduleMetadata } from '@storybook/angular'; import { moduleMetadata } from '@storybook/angular';
import type { Meta, StoryObj } from '@storybook/angular'; import type { Meta, StoryObj } from '@storybook/angular';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
@ -32,10 +32,13 @@ export default {
MatFormFieldModule, MatFormFieldModule,
MatInputModule, MatInputModule,
NgxSkeletonLoaderModule, NgxSkeletonLoaderModule,
NoopAnimationsModule,
ReactiveFormsModule ReactiveFormsModule
], ],
providers: [FireCalculatorService, provideNativeDateAdapter()] providers: [
FireCalculatorService,
provideAnimationsAsync('noop'),
provideNativeDateAdapter()
]
}) })
] ]
} as Meta<GfFireCalculatorComponent>; } as Meta<GfFireCalculatorComponent>;

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

@ -1,6 +1,6 @@
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import '@angular/localize/init'; import '@angular/localize/init';
import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { Meta, moduleMetadata, StoryObj } from '@storybook/angular'; import { Meta, moduleMetadata, StoryObj } from '@storybook/angular';
import { GfTagsSelectorComponent } from './tags-selector.component'; import { GfTagsSelectorComponent } from './tags-selector.component';
@ -10,7 +10,8 @@ export default {
component: GfTagsSelectorComponent, component: GfTagsSelectorComponent,
decorators: [ decorators: [
moduleMetadata({ moduleMetadata({
imports: [CommonModule, NoopAnimationsModule] imports: [CommonModule],
providers: [provideAnimationsAsync('noop')]
}) })
] ]
} as Meta<GfTagsSelectorComponent>; } as Meta<GfTagsSelectorComponent>;

Loading…
Cancel
Save