mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[CL-220] item components (#8870)
This commit is contained in:
@@ -6,9 +6,11 @@ import { Meta, StoryObj, applicationConfig, moduleMetadata } from "@storybook/an
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import {
|
||||
AvatarModule,
|
||||
BadgeModule,
|
||||
ButtonModule,
|
||||
I18nMockService,
|
||||
IconButtonModule,
|
||||
ItemModule,
|
||||
} from "@bitwarden/components";
|
||||
|
||||
import { PopupFooterComponent } from "./popup-footer.component";
|
||||
@@ -30,23 +32,34 @@ class ExtensionContainerComponent {}
|
||||
@Component({
|
||||
selector: "vault-placeholder",
|
||||
template: `
|
||||
<div class="tw-mb-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item</div>
|
||||
<div class="tw-my-8 tw-text-main">vault item last item</div>
|
||||
<bit-item-group aria-label="Mock Vault Items">
|
||||
<bit-item *ngFor="let item of data; index as i">
|
||||
<button bit-item-content>
|
||||
<i slot="start" class="bwi bwi-globe tw-text-3xl tw-text-muted" aria-hidden="true"></i>
|
||||
{{ i }} of {{ data.length - 1 }}
|
||||
<span slot="secondary">Bar</span>
|
||||
</button>
|
||||
|
||||
<ng-container slot="end">
|
||||
<bit-item-action>
|
||||
<button type="button" bitBadge variant="primary">Auto-fill</button>
|
||||
</bit-item-action>
|
||||
<bit-item-action>
|
||||
<button type="button" bitIconButton="bwi-clone" aria-label="Copy item"></button>
|
||||
</bit-item-action>
|
||||
<bit-item-action>
|
||||
<button type="button" bitIconButton="bwi-ellipsis-v" aria-label="More options"></button>
|
||||
</bit-item-action>
|
||||
</ng-container>
|
||||
</bit-item>
|
||||
</bit-item-group>
|
||||
`,
|
||||
standalone: true,
|
||||
imports: [CommonModule, ItemModule, BadgeModule, IconButtonModule],
|
||||
})
|
||||
class VaultComponent {}
|
||||
class VaultComponent {
|
||||
protected data = Array.from(Array(20).keys());
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: "generator-placeholder",
|
||||
|
||||
Reference in New Issue
Block a user