mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-08 00:01:28 +01:00
37 lines
983 B
TypeScript
37 lines
983 B
TypeScript
|
import { CommonModule } from "@angular/common";
|
||
|
import { Meta, StoryObj, moduleMetadata } from "@storybook/angular";
|
||
|
|
||
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||
|
import { I18nMockService, TypographyModule } from "@bitwarden/components";
|
||
|
|
||
|
import { CardComponent } from "./card.component";
|
||
|
|
||
|
export default {
|
||
|
title: "Toools/Card",
|
||
|
component: CardComponent,
|
||
|
decorators: [
|
||
|
moduleMetadata({
|
||
|
imports: [CardComponent, CommonModule, TypographyModule],
|
||
|
providers: [
|
||
|
{
|
||
|
provide: I18nService,
|
||
|
useFactory: () =>
|
||
|
new I18nMockService({
|
||
|
cardMetrics: (value) => `out of ${value}`,
|
||
|
}),
|
||
|
},
|
||
|
],
|
||
|
}),
|
||
|
],
|
||
|
} as Meta;
|
||
|
|
||
|
type Story = StoryObj<CardComponent>;
|
||
|
|
||
|
export const Default: Story = {
|
||
|
render: (args) => ({
|
||
|
props: args,
|
||
|
template: /*html*/ `
|
||
|
<tools-card [title]="'Unsecured Members'" [value]="'38'" [maxValue]="'157'"></tools-card>`,
|
||
|
}),
|
||
|
};
|