1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 09:43:23 +00:00

[CL-425] - add tools card component (#11375)

* add tools card component

* rename to tools-card

* whitelist readme

* fix tw classes in card component

* add RTL support.

* add documentation. revert changes to settings

* Revert vscode settings

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
Jordan Aasen
2024-10-11 14:00:45 -07:00
committed by GitHub
parent 988c2b69e0
commit fa41f29fc4
24 changed files with 173 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
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>`,
}),
};