mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
[pm-11407] fix UI story for danger zone component (#11828)
* Fix story for danger zone component * fix linting * Fix UI Story for Danger Zone component
This commit is contained in:
@@ -3,12 +3,15 @@ import { importProvidersFrom } from "@angular/core";
|
|||||||
import { Meta, StoryObj, applicationConfig, moduleMetadata } from "@storybook/angular";
|
import { Meta, StoryObj, applicationConfig, moduleMetadata } from "@storybook/angular";
|
||||||
|
|
||||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
|
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||||
import { ButtonModule } from "@bitwarden/components";
|
import { ButtonModule } from "@bitwarden/components";
|
||||||
|
|
||||||
import { PreloadedEnglishI18nModule } from "../../../core/tests";
|
import { PreloadedEnglishI18nModule } from "../../../core/tests";
|
||||||
|
|
||||||
import { DangerZoneComponent } from "./danger-zone.component";
|
import { DangerZoneComponent } from "./danger-zone.component";
|
||||||
|
|
||||||
|
class MockConfigService implements Partial<ConfigService> {}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Web/Danger Zone",
|
title: "Web/Danger Zone",
|
||||||
component: DangerZoneComponent,
|
component: DangerZoneComponent,
|
||||||
@@ -17,7 +20,14 @@ export default {
|
|||||||
imports: [ButtonModule, JslibModule, CommonModule],
|
imports: [ButtonModule, JslibModule, CommonModule],
|
||||||
}),
|
}),
|
||||||
applicationConfig({
|
applicationConfig({
|
||||||
providers: [importProvidersFrom(PreloadedEnglishI18nModule)],
|
providers: [
|
||||||
|
importProvidersFrom(PreloadedEnglishI18nModule),
|
||||||
|
{
|
||||||
|
provide: ConfigService,
|
||||||
|
useClass: MockConfigService,
|
||||||
|
multi: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
} as Meta;
|
} as Meta;
|
||||||
|
|||||||
Reference in New Issue
Block a user